Skip to content

Commit

Permalink
Remove comments
Browse files Browse the repository at this point in the history
  • Loading branch information
shakyShane committed Nov 10, 2015
1 parent 592746d commit 075411a
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 16 deletions.
16 changes: 3 additions & 13 deletions recipes/webpack.babel/app.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
var browserSync = require('browser-sync').create();
var webpack = require('webpack');
var webpackDevMiddleware = require('webpack-dev-middleware');
var stripAnsi = require('strip-ansi');
var stripAnsi = require('strip-ansi');

/**
* Require ./webpack.config.js and make a bundler from it
Expand All @@ -14,6 +14,7 @@ var bundler = webpack(webpackConfig);

/**
* Reload all devices when bundle is complete
* or send a fullscreen error message to the browser instead
*/
bundler.plugin('done', function (stats) {
if (stats.hasErrors() || stats.hasWarnings()) {
Expand All @@ -35,22 +36,11 @@ browserSync.init({
logFileChanges: false,
middleware: [
webpackDevMiddleware(bundler, {
// IMPORTANT: dev middleware can't access config, so we should
// provide publicPath by ourselves
publicPath: webpackConfig.output.publicPath,

// pretty colored output
stats: {
colors: true
}

// for other settings see
// http://webpack.github.io/docs/webpack-dev-middleware.html
stats: {colors: true}
})
],
plugins: ['bs-fullscreen-message'],
// no need to watch '*.js' here, webpack will take care of it for us,
// including full page reloads if HMR won't work
files: [
'app/css/*.css',
'app/*.html'
Expand Down
3 changes: 0 additions & 3 deletions recipes/webpack.babel/src/main.js
Original file line number Diff line number Diff line change
@@ -1,8 +1,5 @@
import {inc, dec} from './actions';

// IMPORTANT: it won't work as expected if you'll use addEventListener
// or $(document).ready as it will bind events again and again...
// So you may need some workaround for this or split modules in a particular way
window.onload = function() {
let number = document.getElementById('number');
let incBtn = document.getElementById('inc');
Expand Down

0 comments on commit 075411a

Please sign in to comment.