aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorkumavis <aaron@kumavis.me>2018-01-11 05:54:29 +0800
committerkumavis <aaron@kumavis.me>2018-01-11 05:54:29 +0800
commit27ace69a7fb24b5ac4346f15f8397cf2e45f807d (patch)
tree8b5beb9e4beae628a87f4663b6bd175671fafdc7
parent9a603606a6d4276ee07d412bc0ad9de3baa6b722 (diff)
downloadtangerine-wallet-browser-27ace69a7fb24b5ac4346f15f8397cf2e45f807d.tar
tangerine-wallet-browser-27ace69a7fb24b5ac4346f15f8397cf2e45f807d.tar.gz
tangerine-wallet-browser-27ace69a7fb24b5ac4346f15f8397cf2e45f807d.tar.bz2
tangerine-wallet-browser-27ace69a7fb24b5ac4346f15f8397cf2e45f807d.tar.lz
tangerine-wallet-browser-27ace69a7fb24b5ac4346f15f8397cf2e45f807d.tar.xz
tangerine-wallet-browser-27ace69a7fb24b5ac4346f15f8397cf2e45f807d.tar.zst
tangerine-wallet-browser-27ace69a7fb24b5ac4346f15f8397cf2e45f807d.zip
build - add 'deps' step that records output of 'npm ls' into build
-rw-r--r--gulpfile.js16
1 files changed, 15 insertions, 1 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