From 2d0077d5c67e5861628e865c1477878f3277d10d Mon Sep 17 00:00:00 2001 From: Kevin Serrano Date: Fri, 2 Sep 2016 14:15:00 -0700 Subject: [PATCH] Changelog add and rename vars. --- CHANGELOG.md | 1 + gulpfile.js | 12 ++++++------ 2 files changed, 7 insertions(+), 6 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 0e705adef..d608fd976 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,6 +4,7 @@ - Fix bug where provider menu did not allow switching to custom network from a custom network. - Sending a transaction from within MetaMask no longer triggers a popup. +- The ability to build without livereload features (such as for production) can be enabled with the gulp --disableLiveReload ## 2.10.0 2016-08-29 diff --git a/gulpfile.js b/gulpfile.js index ad87586e5..3d28e7198 100644 --- a/gulpfile.js +++ b/gulpfile.js @@ -19,7 +19,7 @@ var manifest = require('./app/manifest.json') var gulpif = require('gulp-if') var replace = require('gulp-replace') -var production = gutil.env.production +var disableLiveReload = gutil.env.disableLiveReload // browser reload @@ -91,7 +91,7 @@ gulp.task('manifest:production', function() { './dist/chrome/manifest.json', './dist/edge/manifest.json', ],{base: './dist/'}) - .pipe(gulpif(production,jsoneditor(function(json) { + .pipe(gulpif(disableLiveReload,jsoneditor(function(json) { json.background.scripts = ["scripts/background.js"] return json }))) @@ -107,8 +107,8 @@ const staticFiles = [ var copyStrings = staticFiles.map(staticFile => `copy:${staticFile}`) -if (!production) { - copyStrings.push('copy:`reload`') +if (!disableLiveReload) { + copyStrings.push('copy:reload') } gulp.task('copy', gulp.series(gulp.parallel(...copyStrings), 'manifest:production', 'manifest:chrome')) @@ -205,7 +205,7 @@ function copyTask(opts){ destinations.forEach(function(destination) { stream = stream.pipe(gulp.dest(destination)) }) - stream.pipe(gulpif(production,livereload())) + stream.pipe(gulpif(disableLiveReload,livereload())) return stream } @@ -246,7 +246,7 @@ function bundleTask(opts) { .pipe(gulp.dest('./dist/firefox/scripts')) .pipe(gulp.dest('./dist/chrome/scripts')) .pipe(gulp.dest('./dist/edge/scripts')) - .pipe(gulpif(!production,livereload())) + .pipe(gulpif(!disableLiveReload,livereload())) ) }