diff options
author | Dan Finlay <542863+danfinlay@users.noreply.github.com> | 2018-01-12 07:06:36 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-01-12 07:06:36 +0800 |
commit | 7ba9ed922a9da11a8234c60c89c462e7c521c781 (patch) | |
tree | c0c8df14f637791e4b6baeda8bf66e51b24fa467 | |
parent | 89f75a3a3bde50e583688559e7f876062d2fcdcb (diff) | |
parent | 27ace69a7fb24b5ac4346f15f8397cf2e45f807d (diff) | |
download | tangerine-wallet-browser-7ba9ed922a9da11a8234c60c89c462e7c521c781.tar tangerine-wallet-browser-7ba9ed922a9da11a8234c60c89c462e7c521c781.tar.gz tangerine-wallet-browser-7ba9ed922a9da11a8234c60c89c462e7c521c781.tar.bz2 tangerine-wallet-browser-7ba9ed922a9da11a8234c60c89c462e7c521c781.tar.lz tangerine-wallet-browser-7ba9ed922a9da11a8234c60c89c462e7c521c781.tar.xz tangerine-wallet-browser-7ba9ed922a9da11a8234c60c89c462e7c521c781.tar.zst tangerine-wallet-browser-7ba9ed922a9da11a8234c60c89c462e7c521c781.zip |
Merge pull request #2926 from MetaMask/gulp-npmls
build - add 'deps' step that records output of 'npm ls' into build
-rw-r--r-- | gulpfile.js | 16 | ||||
-rw-r--r-- | package.json | 3 |
2 files changed, 16 insertions, 3 deletions
diff --git a/gulpfile.js b/gulpfile.js index 293179892..4c36ff7d4 100644 --- a/gulpfile.js +++ b/gulpfile.js @@ -19,6 +19,8 @@ var manifest = require('./app/manifest.json') var gulpif = require('gulp-if') var replace = require('gulp-replace') var mkdirp = require('mkdirp') +var asyncEach = require('async/each') +var exec = require('child_process').exec var disableDebugTools = gutil.env.disableDebugTools var debug = gutil.env.debug @@ -153,6 +155,18 @@ gulp.task('copy:watch', function(){ gulp.watch(['./app/{_locales,images}/*', './app/scripts/chromereload.js', './app/*.{html,json}'], gulp.series('copy')) }) +// record deps + +gulp.task('deps', function (cb) { + exec('npm ls', (err, stdoutOutput, stderrOutput) => { + if (err) return cb(err) + const browsers = ['firefox','chrome','edge','opera'] + asyncEach(browsers, (target, done) => { + fs.writeFile(`./dist/${target}/deps.txt`, stdoutOutput, done) + }, cb) + }) +}) + // lint js gulp.task('lint', function () { @@ -234,7 +248,7 @@ gulp.task('zip', gulp.parallel('zip:chrome', 'zip:firefox', 'zip:edge', 'zip:ope gulp.task('dev', gulp.series('dev:js', 'copy', gulp.parallel('copy:watch', 'dev:reload'))) -gulp.task('build', gulp.series('clean', gulp.parallel('build:js', 'copy'))) +gulp.task('build', gulp.series('clean', gulp.parallel('build:js', 'copy', 'deps'))) gulp.task('dist', gulp.series('build', 'zip')) // task generators diff --git a/package.json b/package.json index 1d054b2ec..8b846803b 100644 --- a/package.json +++ b/package.json @@ -93,8 +93,6 @@ "extensionizer": "^1.0.0", "fast-json-patch": "^2.0.4", "fast-levenshtein": "^2.0.6", - "gulp": "github:gulpjs/gulp#4.0", - "gulp-eslint": "^4.0.0", "hat": "0.0.3", "human-standard-token-abi": "^1.0.2", "idb-global": "^2.1.0", @@ -190,6 +188,7 @@ "gulp-util": "^3.0.7", "gulp-watch": "^4.3.5", "gulp-zip": "^4.0.0", + "gulp-eslint": "^4.0.0", "isomorphic-fetch": "^2.2.1", "jsdom": "^11.1.0", "jsdom-global": "^3.0.2", |