aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--CHANGELOG.md1
-rw-r--r--gulpfile.js12
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()))
)
}