Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Dev dyh #13

Closed
wants to merge 2 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
1 change: 0 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,6 @@ lib/
/yarn-error.json
/yarn.lock
/packages/foxpage-server/nodemon.json
/packages/foxpage-server/src/third-parties/login/trip-login.ts
/packages/foxpage-server/static/swagger/swagger.json
/packages/foxpage-server.npmrc
/packages/foxpage-server/src/controllers/users/keys.ts
Expand Down
39 changes: 23 additions & 16 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,41 +2,48 @@

All notable changes to this project will be documented in this file. See [standard-version](https://github.com/conventional-changelog/standard-version) for commit guidelines.

### [0.3.4](https://github.com/foxpage/foxpage/compare/v0.3.3...v0.3.4) (2022-07-01)
### [0.3.5](https://github.com/foxpage/foxpage/compare/v0.3.4...v0.3.5) (2022-08-15)

### Optimization

- Optimization user dynamic workspace data
- Optimization structure id is invalid when copy file from store
- Merge apis

### Features

- Retrofit and upgrade Foxpage admin

### [0.3.4](https://github.com/foxpage/foxpage/compare/v0.3.3...v0.3.4) (2022-07-01)

### Bug Fixes

* 🐛 fixed check create variable and condition auth failed ([eeb738e](https://github.com/foxpage/foxpage/commit/eeb738e19af141962b52a5c402bff318b88cb676))
- 🐛 fixed check create variable and condition auth failed ([eeb738e](https://github.com/foxpage/foxpage/commit/eeb738e19af141962b52a5c402bff318b88cb676))

### [0.3.3](https://github.com/foxpage/foxpage/compare/v0.3.2...v0.3.3) (2022-07-01)


### Features

* 🎸 Add authorize apis ([e66cfd4](https://github.com/foxpage/foxpage/commit/e66cfd47e4e0ece77e4201191553a41ac04592b1))
* 🎸 add get user list api ([863dcfa](https://github.com/foxpage/foxpage/commit/863dcfa83ecd6a3cec2073b9a674b3569563e269))
* 🎸 Add mocks, bulk import components and optimization code ([65bcdb7](https://github.com/foxpage/foxpage/commit/65bcdb7b1f8e6cd598d43ba1672c11283ad83d32))

- 🎸 Add authorize apis ([e66cfd4](https://github.com/foxpage/foxpage/commit/e66cfd47e4e0ece77e4201191553a41ac04592b1))
- 🎸 add get user list api ([863dcfa](https://github.com/foxpage/foxpage/commit/863dcfa83ecd6a3cec2073b9a674b3569563e269))
- 🎸 Add mocks, bulk import components and optimization code ([65bcdb7](https://github.com/foxpage/foxpage/commit/65bcdb7b1f8e6cd598d43ba1672c11283ad83d32))

### Bug Fixes

* 🐛 Fixed create app detail validate error ([ded2541](https://github.com/foxpage/foxpage/commit/ded25412394c8614eeb1d90764616ea6cfaf509b))
* 🐛 Fixed get error env config file ([c081dd9](https://github.com/foxpage/foxpage/commit/c081dd97949f41bb7ecfed9549f634f281febc73))
- 🐛 Fixed create app detail validate error ([ded2541](https://github.com/foxpage/foxpage/commit/ded25412394c8614eeb1d90764616ea6cfaf509b))
- 🐛 Fixed get error env config file ([c081dd9](https://github.com/foxpage/foxpage/commit/c081dd97949f41bb7ecfed9549f634f281febc73))

### [0.3.1](https://github.com/foxpage/foxpage/compare/v0.3.2...v0.3.1) (2022-07-01)


### Features

* 🎸 Add authorize apis ([e66cfd4](https://github.com/foxpage/foxpage/commit/e66cfd47e4e0ece77e4201191553a41ac04592b1))
* 🎸 add get user list api ([863dcfa](https://github.com/foxpage/foxpage/commit/863dcfa83ecd6a3cec2073b9a674b3569563e269))
* 🎸 Add mocks, bulk import components and optimization code ([65bcdb7](https://github.com/foxpage/foxpage/commit/65bcdb7b1f8e6cd598d43ba1672c11283ad83d32))

- 🎸 Add authorize apis ([e66cfd4](https://github.com/foxpage/foxpage/commit/e66cfd47e4e0ece77e4201191553a41ac04592b1))
- 🎸 add get user list api ([863dcfa](https://github.com/foxpage/foxpage/commit/863dcfa83ecd6a3cec2073b9a674b3569563e269))
- 🎸 Add mocks, bulk import components and optimization code ([65bcdb7](https://github.com/foxpage/foxpage/commit/65bcdb7b1f8e6cd598d43ba1672c11283ad83d32))

### Bug Fixes

* 🐛 Fixed create app detail validate error ([ded2541](https://github.com/foxpage/foxpage/commit/ded25412394c8614eeb1d90764616ea6cfaf509b))
* 🐛 Fixed get error env config file ([c081dd9](https://github.com/foxpage/foxpage/commit/c081dd97949f41bb7ecfed9549f634f281febc73))
- 🐛 Fixed create app detail validate error ([ded2541](https://github.com/foxpage/foxpage/commit/ded25412394c8614eeb1d90764616ea6cfaf509b))
- 🐛 Fixed get error env config file ([c081dd9](https://github.com/foxpage/foxpage/commit/c081dd97949f41bb7ecfed9549f634f281febc73))

# Changelog
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "foxpage",
"version": "0.3.4",
"version": "0.3.5",
"private": true,
"bugs": {
"url": "https://github.com/foxpage/foxpage/issues"
Expand Down
1 change: 0 additions & 1 deletion packages/foxpage-admin/babel.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@ module.exports = (api) => {
useBuiltIns: 'entry',
corejs: 2,
modules: isProduction ? false : 'commonjs',
// debug: true,
};

return {
Expand Down
9 changes: 9 additions & 0 deletions packages/foxpage-admin/build/tsconfig.webpack.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
{
"extends": "../tsconfig.json",
"include": [
"../src/**/*.d.ts",
],
"files": [
"../src/Index.tsx"
]
}
131 changes: 131 additions & 0 deletions packages/foxpage-admin/build/webpack.base.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,131 @@
const path = require('path');
const TsconfigPathsPlugin = require('tsconfig-paths-webpack-plugin');

module.exports = {
context: path.resolve(__dirname),
output: {
publicPath: '/page/dist/',
filename: 'main.bundle.js',
chunkFilename: '[name].[contenthash:8].js',
path: path.resolve(__dirname, '../dist'),
},
resolve: {
extensions: ['.js', '.ts', '.tsx', '.css'],
fallback: {
crypto: require.resolve('crypto-browserify'),
stream: require.resolve('stream-browserify'),
util: require.resolve('util'),
},
plugins: [
// @ts-ignore
new TsconfigPathsPlugin({
configFile: path.join(__dirname, './tsconfig.webpack.json'),
}),
],
},
module: {
rules: [
{
test: /\.(ts|tsx)$/,
exclude: /node_modules/,
use: [
{
loader: 'babel-loader',
options: {
configFile: path.resolve(__dirname, '../babel.config.js'),
},
},
],
},
{
test: /\.md$/,
loader: 'raw-loader',
},
{
test: /\.css$/,
use: ['style-loader', 'css-loader'],
},
{
test: /\.woff(\?v=\d+\.\d+\.\d+)?$/,
loader: 'url-loader',
options: {
limit: '10000',
mimetype: 'application/font-woff',
},
},
{
test: /\.woff2(\?v=\d+\.\d+\.\d+)?$/,
loader: 'url-loader',
options: {
limit: '10000',
mimetype: 'application/font-woff',
},
},
{
test: /\.ttf(\?v=\d+\.\d+\.\d+)?$/,
loader: 'url-loader',
options: {
limit: '10000',
mimetype: 'application/octet-stream',
},
},
{
test: /\.eot(\?v=\d+\.\d+\.\d+)?$/,
loader: 'file-loader',
},
{
test: /\.svg(\?v=\d+\.\d+\.\d+)?$/,
loader: 'file-loader',
},
{
test: require.resolve('react'),
loader: 'expose-loader',
options: {
exposes: 'React',
},
},
{
test: require.resolve('react-dom'),
loader: 'expose-loader',
options: {
exposes: 'ReactDOM',
},
},
{
test: require.resolve('prop-types'),
loader: 'expose-loader',
options: {
exposes: 'PropTypes',
},
},
{
test: require.resolve('antd'),
loader: 'expose-loader',
options: {
exposes: 'antd',
},
},
{
test: require.resolve('axios'),
loader: 'expose-loader',
options: {
exposes: 'axios',
},
},
{
test: require.resolve('html-react-parser'),
loader: 'expose-loader',
options: {
exposes: 'HTMLDOMParser',
},
},
{
test: require.resolve('styled-components'),
loader: 'expose-loader',
options: {
exposes: 'styled',
},
},
],
},
};
59 changes: 59 additions & 0 deletions packages/foxpage-admin/build/webpack.dev.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@
const webpack = require('webpack');
const { merge } = require('webpack-merge');

const path = require('path');
const webpackBaseConfig = require('./webpack.base.config');
const configProfile = require('../env.config');

const PORT = 3002;

module.exports = merge(webpackBaseConfig, {
output: {
publicPath: '/dist/',
filename: 'main.bundle.js',
chunkFilename: '[name].[contenthash:8].js',
path: path.resolve(__dirname, './dist'),
},
cache: true,
devtool: 'inline-source-map',
mode: 'development',
entry: {
main: [
'@babel/polyfill',
'react-hot-loader/patch',
`webpack-dev-server/client?http://0.0.0.0:${PORT}`,
'webpack/hot/only-dev-server',
path.join(__dirname, '../src/Index.tsx'),
],
},

devServer: {
contentBase: './src', // Relative directory for base of server
hot: true, // Live-reload
inline: true,
port: PORT, // Port Number
host: 'localhost', // Change to '0.0.0.0' for external facing server
disableHostCheck: true,
},

module: {
rules: [
{
test: /\.(jpg|gif|png|jpeg)$/,
loader: 'file-loader',
},
],
},

plugins: [
new webpack.HotModuleReplacementPlugin(),
new webpack.DefinePlugin({
APP_CONFIG: JSON.stringify(configProfile.dev),
__DEV__: true,
__PORT__: PORT,
'process.env': {
NODE_ENV: JSON.stringify(process.env.NODE_ENV),
},
}),
],
});
45 changes: 45 additions & 0 deletions packages/foxpage-admin/build/webpack.prd.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
const { merge } = require('webpack-merge');
const webpack = require('webpack');
const webpackBaseConfig = require('./webpack.base.config');
const CopyWebpackPlugin = require('copy-webpack-plugin');
const UglifyJsPlugin = require('uglifyjs-webpack-plugin');

module.exports = merge(webpackBaseConfig, {
mode: 'production',
entry: {
main: ['babel-polyfill', '../src/Index.tsx'],
},

module: {
rules: [
{
test: /\.(jpg|gif|png)$/,
loader: 'file-loader',
},
],
},

plugins: [
new UglifyJsPlugin({
uglifyOptions: {
warnings: false,
output: {
comments: false,
},
},
}),
new CopyWebpackPlugin({
patterns: [
{ from: '../src/index.html' },
{ from: '../src/environment.html' },
{ from: '../src/images', to: 'images' },
]
}),
new webpack.DefinePlugin({
__DEV__: false,
'process.env': {
NODE_ENV: JSON.stringify(process.env.NODE_ENV),
},
}),
],
});
7 changes: 7 additions & 0 deletions packages/foxpage-admin/env.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
module.exports = {
dev: {
env: 'dev',
foxpageApi: 'http://localhost:3003/',
slug: '',
},
};