aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorThomas Huang <tmashuang@users.noreply.github.com>2017-06-27 02:58:45 +0800
committerGitHub <noreply@github.com>2017-06-27 02:58:45 +0800
commit27a0694d8519b302a14080f5b72ddf1c73e0d9a7 (patch)
tree2c9d57278d6e14f1fd7db395dec3e23c983a8708
parentf022c7c714e17faf9558839116ba90ca8082e6b1 (diff)
parentf21d42583983a87588963895a301f40ccc3e8c2b (diff)
downloadtangerine-wallet-browser-27a0694d8519b302a14080f5b72ddf1c73e0d9a7.tar
tangerine-wallet-browser-27a0694d8519b302a14080f5b72ddf1c73e0d9a7.tar.gz
tangerine-wallet-browser-27a0694d8519b302a14080f5b72ddf1c73e0d9a7.tar.bz2
tangerine-wallet-browser-27a0694d8519b302a14080f5b72ddf1c73e0d9a7.tar.lz
tangerine-wallet-browser-27a0694d8519b302a14080f5b72ddf1c73e0d9a7.tar.xz
tangerine-wallet-browser-27a0694d8519b302a14080f5b72ddf1c73e0d9a7.tar.zst
tangerine-wallet-browser-27a0694d8519b302a14080f5b72ddf1c73e0d9a7.zip
Merge pull request #1674 from MetaMask/remove-maps
Simplify build variables. Remove maps from production.
-rw-r--r--gulpfile.js14
-rw-r--r--package.json2
2 files changed, 8 insertions, 8 deletions
diff --git a/gulpfile.js b/gulpfile.js
index 3f235396c..cc723704a 100644
--- a/gulpfile.js
+++ b/gulpfile.js
@@ -20,7 +20,7 @@ var gulpif = require('gulp-if')
var replace = require('gulp-replace')
var mkdirp = require('mkdirp')
-var disableLiveReload = gutil.env.disableLiveReload
+var disableDebugTools = gutil.env.disableDebugTools
var debug = gutil.env.debug
// browser reload
@@ -121,7 +121,7 @@ gulp.task('manifest:production', function() {
'./dist/chrome/manifest.json',
'./dist/edge/manifest.json',
],{base: './dist/'})
- .pipe(gulpif(disableLiveReload,jsoneditor(function(json) {
+ .pipe(gulpif(!debug,jsoneditor(function(json) {
json.background.scripts = ["scripts/background.js"]
return json
})))
@@ -138,7 +138,7 @@ const staticFiles = [
var copyStrings = staticFiles.map(staticFile => `copy:${staticFile}`)
copyStrings.push('copy:contractImages')
-if (!disableLiveReload) {
+if (debug) {
copyStrings.push('copy:reload')
}
@@ -234,7 +234,7 @@ function copyTask(opts){
destinations.forEach(function(destination) {
stream = stream.pipe(gulp.dest(destination))
})
- stream.pipe(gulpif(!disableLiveReload,livereload()))
+ stream.pipe(gulpif(debug,livereload()))
return stream
}
@@ -314,16 +314,16 @@ function bundleTask(opts) {
.pipe(buffer())
// sourcemaps
// loads map from browserify file
- .pipe(sourcemaps.init({loadMaps: true}))
+ .pipe(gulpif(debug, sourcemaps.init({loadMaps: true})))
// writes .map file
- .pipe(sourcemaps.write('./'))
+ .pipe(gulpif(debug, sourcemaps.write('./')))
// write completed bundles
.pipe(gulp.dest('./dist/firefox/scripts'))
.pipe(gulp.dest('./dist/chrome/scripts'))
.pipe(gulp.dest('./dist/edge/scripts'))
.pipe(gulp.dest('./dist/opera/scripts'))
// finally, trigger live reload
- .pipe(gulpif(!disableLiveReload, livereload()))
+ .pipe(gulpif(debug, livereload()))
)
}
diff --git a/package.json b/package.json
index 01c256ef3..3f62923f8 100644
--- a/package.json
+++ b/package.json
@@ -7,7 +7,7 @@
"start": "npm run dev",
"dev": "gulp dev --debug",
"disc": "gulp disc --debug",
- "dist": "npm install && gulp dist --disableLiveReload",
+ "dist": "npm install && gulp dist",
"test": "npm run lint && npm run test-unit && npm run test-integration",
"test-unit": "METAMASK_ENV=test mocha --require test/helper.js --recursive \"test/unit/**/*.js\"",
"test-integration": "npm run buildMock && npm run buildCiUnits && testem ci -P 2",