@autobest-ui/scripts 1.9.1 → 1.9.3-alpha.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -85,20 +85,16 @@ module.exports = function(
85
85
 
86
86
  ## 自定义
87
87
 
88
- #### 自定义端口
89
-
90
- ##### react-spa 自定义方式
91
- `react-spa start --port 3031` 或者已经在package.json.scripts中定义后(`{start: "react-spa start"}`), 将需要这样写 `npm run start -- --port 3031`
92
-
93
- ##### react-ssr 自定义方式
94
- 1. `react-ssr start --port 3031` 或者已经在package.json.scripts中定义后(`{start: "react-ssr start"}`), 将需要这样写 `npm run start -- --port 3031`
95
- 1. `react-ssr server --port 3031` 或者已经在package.json.scripts中定义后(`{server: "react-ssr server"}`), 将需要这样写 `npm run server -- --port 3031`
96
-
88
+ #### 系统支持的运行参数
89
+ | 参数名 | 默认值 | 说明 |
90
+ |---------------------|-------------------|----------------------------------------------------------------|
91
+ | --port 3031 | startDefaultPort值 | 覆盖默认端口号 `react-spa start --port 3031` |
92
+ | --eslint | false | 运行时是否启动语法检查 `react-spa start --eslint`,`build`情况下该参数失效,不执行语法检查 |
97
93
 
98
94
  #### 自定义其他参数
99
95
  **例如:**
100
- `react-spa start --site APW`
101
- `react-ssr start --port 3032 --site APW`
96
+ - `react-spa start --site APW`
97
+ - `react-ssr start --port 3032 --site APW`
102
98
 
103
99
  该参数将解析成对象,通过get**EnvConfig()参数传递,此方式,可区分自定义的环境变量,例如:www2.0项目中site的区分。
104
100
 
@@ -1,5 +1,4 @@
1
1
  const webpack = require('webpack');
2
- const ESLintPlugin = require('eslint-webpack-plugin');
3
2
  const MiniCssExtractPlugin = require('mini-css-extract-plugin');
4
3
  const ProgressBarPlugin = require('progress-bar-webpack-plugin');
5
4
  const getCSSModuleLocalIdent = require('./getCSSModuleLocalIdent');
@@ -234,7 +233,7 @@ module.exports = (appConfig, extendEnv, { isProd, isServer, isHotServer }) => {
234
233
  }
235
234
  if (!isProd && appConfig.eslint) {
236
235
  result.plugins.push(
237
- new ESLintPlugin({
236
+ new (require('eslint-webpack-plugin'))({
238
237
  exclude: 'node_modules',
239
238
  threads: 4,
240
239
  failOnError: false,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@autobest-ui/scripts",
3
- "version": "1.9.1",
3
+ "version": "1.9.3-alpha.0",
4
4
  "private": false,
5
5
  "description": "utils for project tools",
6
6
  "bin": {
@@ -102,5 +102,5 @@
102
102
  "eslint": "^8.23.1",
103
103
  "typescript": "4.8.3"
104
104
  },
105
- "gitHead": "f3d84d663a9d610f83c1da440a08a04892732bc4"
105
+ "gitHead": "fb75bd54150164e95c075eef437badba8dcd0728"
106
106
  }