ff-stream-web

git clone git://archive.git.mtrnord.blog/MTRNord/ff-stream-web.git
Log | Files | Refs | README | LICENSE

commit 58c0b98ee50bc689c8da8bbf082a154fcfae8a50
parent 4d08585c5c8757589fd1998d6ad17e118917a796
Author: David Kirchner <dpk@bybeardy.com>
Date:   Fri, 25 Dec 2015 17:11:52 -0600

fix lint warnings

Diffstat:
Mtools/bundle.js | 1+
Mtools/start.js | 5+++++
Mtools/webpack.config.js | 3+++
3 files changed, 9 insertions(+), 0 deletions(-)

diff --git a/tools/bundle.js b/tools/bundle.js @@ -19,6 +19,7 @@ function bundle() { if (err) { return reject(err); } + console.log(stats.toString(webpackConfig[0].stats)); resolve(); }); diff --git a/tools/start.js b/tools/start.js @@ -33,6 +33,7 @@ async function start() { } else { config.entry = ['webpack-hot-middleware/client', config.entry]; } + config.plugins.push(new webpack.HotModuleReplacementPlugin()); config.plugins.push(new webpack.NoErrorsPlugin()); config.module.loaders @@ -60,11 +61,14 @@ async function start() { const bundler = webpack(webpackConfig); const wpMiddleware = webpackMiddleware(bundler, { + // IMPORTANT: webpack middleware can't access config, // so we should provide publicPath by ourselves publicPath: webpackConfig[0].output.publicPath, + // Pretty colored output stats: webpackConfig[0].stats, + // For other settings see // https://webpack.github.io/docs/webpack-dev-middleware }); @@ -81,6 +85,7 @@ async function start() { target: host, middleware: [wpMiddleware, ...hotMiddlewares], }, + // no need to watch '*.js' here, webpack will take care of it for us, // including full page reloads if HMR won't work files: ['build/content/**/*.*'], diff --git a/tools/webpack.config.js b/tools/webpack.config.js @@ -130,7 +130,10 @@ const clientConfig = merge({}, config, { new webpack.optimize.DedupePlugin(), new webpack.optimize.UglifyJsPlugin({ compress: { + // jscs:disable requireCamelCaseOrUpperCaseIdentifiers screw_ie8: true, + + // jscs:enable requireCamelCaseOrUpperCaseIdentifiers warnings: VERBOSE, }, }),