From 962dc21aab4e73613f9e62fff6a32f265480f938 Mon Sep 17 00:00:00 2001 From: Enrico Fasoli Date: Sat, 14 Nov 2015 17:33:43 +0100 Subject: [PATCH] introduced source maps, and fixed uglify again --- gulpfile.js | 11 +++++++++-- webapp/app.jsx | 1 - 2 files changed, 9 insertions(+), 3 deletions(-) diff --git a/gulpfile.js b/gulpfile.js index fc1850c..219f508 100644 --- a/gulpfile.js +++ b/gulpfile.js @@ -5,6 +5,7 @@ var minifyCss = require('gulp-minify-css') var browserify = require('browserify') var uglify = require('gulp-uglify') var clean = require('gulp-clean') +var exorcist = require('exorcist') var connect = require('gulp-connect') var config = { @@ -32,10 +33,16 @@ gulp.task('html',function(){ }) gulp.task('js',function(){ - browserify(config.files.mainJs) - .transform('babelify', { presets: [ 'es2015', 'react' ]}) + browserify(config.files.mainJs, { debug: true }) + .transform('babelify', { + global: true, + presets: [ 'es2015', 'react' ], + ignore: /buffer|EventEmitter/ + }) .transform('eslintify') + .transform({ global: true },'uglifyify') .bundle() + .pipe(exorcist(__dirname+'/webapp/dist/app.js.map')) .on('error', console.error.bind(console)) .pipe(source('app.js')) // do this or browserify won't work .pipe(buffer()) // do this or uglify won't work diff --git a/webapp/app.jsx b/webapp/app.jsx index 542945f..19d9575 100644 --- a/webapp/app.jsx +++ b/webapp/app.jsx @@ -67,7 +67,6 @@ var Profile = React.createClass({ } }) ee.on('boards',l => { - console.log('Arrived boards',l) this.setState({ boards: l }) }) },