remove watch & build-dist webpack scripts

nolan/hinaloe-test
Nick Filatov 2017-09-03 19:13:10 +06:00
parent 74a0ba4c60
commit 502c258c4f
2 changed files with 0 additions and 72 deletions

View File

@ -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,
})
)
})

View File

@ -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,
})
)
})