diff options
author | Frankie <frankie.diamond@gmail.com> | 2018-03-31 06:50:00 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-03-31 06:50:00 +0800 |
commit | 641171eae33e1bb105c633997f5f863057a55816 (patch) | |
tree | 7d8b7c40b64d5c23c9550f05acdca1137e31a3de | |
parent | 8e0f39353dd47c4a201aaf2ee160912846f2e68b (diff) | |
parent | 80839eebe4ac720855ab5fadd70da6e59bae3c91 (diff) | |
download | tangerine-wallet-browser-641171eae33e1bb105c633997f5f863057a55816.tar tangerine-wallet-browser-641171eae33e1bb105c633997f5f863057a55816.tar.gz tangerine-wallet-browser-641171eae33e1bb105c633997f5f863057a55816.tar.bz2 tangerine-wallet-browser-641171eae33e1bb105c633997f5f863057a55816.tar.lz tangerine-wallet-browser-641171eae33e1bb105c633997f5f863057a55816.tar.xz tangerine-wallet-browser-641171eae33e1bb105c633997f5f863057a55816.tar.zst tangerine-wallet-browser-641171eae33e1bb105c633997f5f863057a55816.zip |
Merge pull request #3806 from MetaMask/build-dev-fix
build - properly set GULP_METAMASK_DEBUG on dev
-rw-r--r-- | gulpfile.js | 11 | ||||
-rw-r--r-- | package.json | 1 |
2 files changed, 5 insertions, 7 deletions
diff --git a/gulpfile.js b/gulpfile.js index 3ca0c65de..1eb0a974b 100644 --- a/gulpfile.js +++ b/gulpfile.js @@ -16,7 +16,6 @@ const eslint = require('gulp-eslint') const fs = require('fs') const path = require('path') const manifest = require('./app/manifest.json') -const gulpif = require('gulp-if') const replace = require('gulp-replace') const mkdirp = require('mkdirp') const asyncEach = require('async/each') @@ -31,8 +30,6 @@ const debug = require('gulp-debug') const pify = require('pify') const endOfStream = pify(require('end-of-stream')) -const disableDebugTools = gutil.env.disableDebugTools -const debugMode = gutil.env.debug const browserPlatforms = [ 'firefox', @@ -181,12 +178,12 @@ gulp.task('manifest:production', function() { ],{base: './dist/'}) // Exclude chromereload script in production: - .pipe(gulpif(!debugMode,jsoneditor(function(json) { + .pipe(jsoneditor(function(json) { json.background.scripts = json.background.scripts.filter((script) => { return !script.includes('chromereload') }) return json - }))) + })) .pipe(gulp.dest('./dist/', { overwrite: true })) }) @@ -311,6 +308,7 @@ function createTasksForBuildJsExtension({ buildJsFiles, taskPrefix, devMode, bun minifyBuild: !devMode, buildWithFullPaths: devMode, watch: devMode, + devMode, }, bundleTaskOpts) createTasksForBuildJs({ rootDir, taskPrefix, bundleTaskOpts, destinations, buildPhase1, buildPhase2 }) } @@ -326,6 +324,7 @@ function createTasksForBuildJsMascara({ taskPrefix, devMode, bundleTaskOpts = {} minifyBuild: !devMode, buildWithFullPaths: devMode, watch: devMode, + devMode, }, bundleTaskOpts) createTasksForBuildJs({ rootDir, taskPrefix, bundleTaskOpts, destinations, buildPhase1 }) } @@ -541,7 +540,7 @@ function bundleTask(opts) { // convert bundle stream to gulp vinyl stream .pipe(source(opts.filename)) // inject variables into bundle - .pipe(replace('\'GULP_METAMASK_DEBUG\'', debugMode)) + .pipe(replace('\'GULP_METAMASK_DEBUG\'', opts.devMode)) // buffer file contents (?) .pipe(buffer()) diff --git a/package.json b/package.json index a852395b3..24796b083 100644 --- a/package.json +++ b/package.json @@ -221,7 +221,6 @@ "gulp": "github:gulpjs/gulp#6d71a658c61edb3090221579d8f97dbe086ba2ed", "gulp-babel": "^7.0.0", "gulp-eslint": "^4.0.0", - "gulp-if": "^2.0.2", "gulp-json-editor": "^2.2.1", "gulp-livereload": "^3.8.1", "gulp-replace": "^0.6.1", |