add eslint config and format build folder
This commit is contained in:
parent
39e7e56cf1
commit
1f9fbacfb8
6 changed files with 30 additions and 23 deletions
8
build/.eslintrc.json
Normal file
8
build/.eslintrc.json
Normal file
|
@ -0,0 +1,8 @@
|
||||||
|
{
|
||||||
|
"extends": [
|
||||||
|
"../.eslintrc.json"
|
||||||
|
],
|
||||||
|
"env": {
|
||||||
|
"node": true
|
||||||
|
}
|
||||||
|
}
|
|
@ -1,7 +1,6 @@
|
||||||
/**
|
/**
|
||||||
* 公共配置
|
* 公共配置
|
||||||
*/
|
*/
|
||||||
var webpack = require('webpack');
|
|
||||||
var path = require('path');
|
var path = require('path');
|
||||||
function resolve (dir) {
|
function resolve (dir) {
|
||||||
return path.join(__dirname, '..', dir)
|
return path.join(__dirname, '..', dir)
|
||||||
|
|
|
@ -6,9 +6,9 @@ var path = require('path');
|
||||||
var webpack = require('webpack');
|
var webpack = require('webpack');
|
||||||
// var ExtractTextPlugin = require('extract-text-webpack-plugin');
|
// var ExtractTextPlugin = require('extract-text-webpack-plugin');
|
||||||
var HtmlWebpackPlugin = require('html-webpack-plugin');
|
var HtmlWebpackPlugin = require('html-webpack-plugin');
|
||||||
var merge = require('webpack-merge')
|
var merge = require('webpack-merge');
|
||||||
var webpackBaseConfig = require('./webpack.base.config.js');
|
var webpackBaseConfig = require('./webpack.base.config.js');
|
||||||
var FriendlyErrorsPlugin = require('friendly-errors-webpack-plugin')
|
var FriendlyErrorsPlugin = require('friendly-errors-webpack-plugin');
|
||||||
|
|
||||||
|
|
||||||
module.exports = merge(webpackBaseConfig, {
|
module.exports = merge(webpackBaseConfig, {
|
||||||
|
|
|
@ -1,9 +1,9 @@
|
||||||
var path = require('path');
|
var path = require('path');
|
||||||
var webpack = require('webpack');
|
var webpack = require('webpack');
|
||||||
var merge = require('webpack-merge')
|
var merge = require('webpack-merge');
|
||||||
var webpackBaseConfig = require('./webpack.base.config.js');
|
var webpackBaseConfig = require('./webpack.base.config.js');
|
||||||
|
|
||||||
process.env.NODE_ENV = 'production'
|
process.env.NODE_ENV = 'production';
|
||||||
|
|
||||||
module.exports = merge(webpackBaseConfig, {
|
module.exports = merge(webpackBaseConfig, {
|
||||||
entry: {
|
entry: {
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
var path = require('path');
|
var path = require('path');
|
||||||
var webpack = require('webpack');
|
var webpack = require('webpack');
|
||||||
var merge = require('webpack-merge')
|
var merge = require('webpack-merge');
|
||||||
var webpackBaseConfig = require('./webpack.base.config.js');
|
var webpackBaseConfig = require('./webpack.base.config.js');
|
||||||
|
|
||||||
process.env.NODE_ENV = 'production';
|
process.env.NODE_ENV = 'production';
|
||||||
|
|
|
@ -2,8 +2,8 @@
|
||||||
* 用于单元测试
|
* 用于单元测试
|
||||||
*/
|
*/
|
||||||
|
|
||||||
var webpack = require('webpack')
|
var webpack = require('webpack');
|
||||||
var merge = require('webpack-merge')
|
var merge = require('webpack-merge');
|
||||||
var webpackBaseConfig = require('./webpack.base.config.js');
|
var webpackBaseConfig = require('./webpack.base.config.js');
|
||||||
|
|
||||||
|
|
||||||
|
@ -17,9 +17,9 @@ var webpackConfig = merge(webpackBaseConfig, {
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
]
|
]
|
||||||
})
|
});
|
||||||
|
|
||||||
// no need for app entry during tests
|
// no need for app entry during tests
|
||||||
delete webpackConfig.entry
|
delete webpackConfig.entry;
|
||||||
|
|
||||||
module.exports = webpackConfig
|
module.exports = webpackConfig;
|
||||||
|
|
Loading…
Add table
Reference in a new issue