aboutsummaryrefslogtreecommitdiffstats
path: root/gulpfile.js
diff options
context:
space:
mode:
authorKevin Serrano <kevgagser@gmail.com>2016-09-02 06:19:31 +0800
committerKevin Serrano <kevgagser@gmail.com>2016-09-02 06:19:31 +0800
commitc02be4fa66a037bd23fb5d51759b6d4a7486bf6e (patch)
treea364fb9ffd87861c03271d3a53ca7ea54adb7306 /gulpfile.js
parent168b4c5bc034367912f32bad6706cc91987d1085 (diff)
downloadtangerine-wallet-browser-c02be4fa66a037bd23fb5d51759b6d4a7486bf6e.tar
tangerine-wallet-browser-c02be4fa66a037bd23fb5d51759b6d4a7486bf6e.tar.gz
tangerine-wallet-browser-c02be4fa66a037bd23fb5d51759b6d4a7486bf6e.tar.bz2
tangerine-wallet-browser-c02be4fa66a037bd23fb5d51759b6d4a7486bf6e.tar.lz
tangerine-wallet-browser-c02be4fa66a037bd23fb5d51759b6d4a7486bf6e.tar.xz
tangerine-wallet-browser-c02be4fa66a037bd23fb5d51759b6d4a7486bf6e.tar.zst
tangerine-wallet-browser-c02be4fa66a037bd23fb5d51759b6d4a7486bf6e.zip
Add production flag. Conditionally copy reload based on production.
Diffstat (limited to 'gulpfile.js')
-rw-r--r--gulpfile.js17
1 files changed, 16 insertions, 1 deletions
diff --git a/gulpfile.js b/gulpfile.js
index 40ae6f203..2f2722a3b 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 production = false
+
// browser reload
gulp.task('dev:reload', function() {
@@ -83,7 +85,20 @@ gulp.task('manifest:chrome', function() {
.pipe(gulp.dest('./dist/chrome', { overwrite: true }))
})
-gulp.task('copy', gulp.series(gulp.parallel('copy:locales','copy:images','copy:fonts','copy:reload','copy:root'), 'manifest:chrome'))
+gulp.task('manifest:production', function() {
+ return gulp.src([
+ './dist/firefox/manifest.json',
+ './dist/chrome/manifest.json',
+ './dist/edge/manifest.json',
+ ],{base: './dist/'})
+ .pipe(gulpif(production,jsoneditor(function(json) {
+ json.background.scripts = ["scripts/background.js"]
+ return json
+ })))
+ .pipe(gulp.dest('./dist/', { overwrite: true }))
+})
+
+gulp.task('copy', gulp.series(gulp.parallel('copy:locales','copy:images','copy:fonts','copy:reload','copy:root'), 'manifest:production', 'manifest:chrome'))
gulp.task('copy:watch', function(){
gulp.watch(['./app/{_locales,images}/*', './app/scripts/chromereload.js', './app/*.{html,json}'], gulp.series('copy'))
})