remove watch & build-dist webpack scripts
parent
74a0ba4c60
commit
502c258c4f
|
@ -1,44 +0,0 @@
|
|||
var path = require('path')
|
||||
var extend = require('util')._extend
|
||||
var webpack = require('webpack')
|
||||
|
||||
var configs = ['development', 'production'].map((env) => {
|
||||
var configPath = '../src/webpack.config.js',
|
||||
config = require(configPath)
|
||||
|
||||
delete require.cache[require.resolve(configPath)]
|
||||
|
||||
if (env === 'production') {
|
||||
config.output.filename = config.output.filename.replace(/\.js$/, '.min.js')
|
||||
config.plugins.push(
|
||||
new webpack.optimize.UglifyJsPlugin({
|
||||
compressor: { warnings: false }
|
||||
})
|
||||
)
|
||||
}
|
||||
|
||||
return config
|
||||
})
|
||||
|
||||
webpack(configs, (err, stats) => {
|
||||
if (err) throw err
|
||||
|
||||
console.log(
|
||||
stats.toString({
|
||||
colors: true,
|
||||
hash: true,
|
||||
version: false,
|
||||
timings: true,
|
||||
assets: true,
|
||||
chunks: false,
|
||||
chunkModules: false,
|
||||
modules: false,
|
||||
children: false,
|
||||
cached: false,
|
||||
reasons: false,
|
||||
source: false,
|
||||
errorDetails: false,
|
||||
chunkOrigins: false,
|
||||
})
|
||||
)
|
||||
})
|
|
@ -1,28 +0,0 @@
|
|||
var path = require('path')
|
||||
var webpack = require('webpack')
|
||||
|
||||
var config = require('../example/webpack.config.js'),
|
||||
compiler = webpack(config)
|
||||
|
||||
compiler.watch({}, (err, stats) => {
|
||||
if (err) throw err
|
||||
|
||||
console.log(
|
||||
stats.toString({
|
||||
colors: true,
|
||||
hash: true,
|
||||
version: false,
|
||||
timings: true,
|
||||
assets: true,
|
||||
chunks: false,
|
||||
chunkModules: false,
|
||||
modules: false,
|
||||
children: false,
|
||||
cached: false,
|
||||
reasons: false,
|
||||
source: false,
|
||||
errorDetails: false,
|
||||
chunkOrigins: false,
|
||||
})
|
||||
)
|
||||
})
|
Loading…
Reference in New Issue