aboutsummaryrefslogtreecommitdiffstats
path: root/gulpfile.js
diff options
context:
space:
mode:
authorDan Finlay <dan@danfinlay.com>2016-07-29 01:50:14 +0800
committerDan Finlay <dan@danfinlay.com>2016-07-29 01:50:14 +0800
commitdaaac17be20faf3f53f3a4b04d70504ebf894568 (patch)
treeda73e606b2cbf4d5bf271ed0603177496c916c1f /gulpfile.js
parenta259dfad253250edee57c4def80ad799c84ba2db (diff)
downloadtangerine-wallet-browser-daaac17be20faf3f53f3a4b04d70504ebf894568.tar.gz
tangerine-wallet-browser-daaac17be20faf3f53f3a4b04d70504ebf894568.tar.zst
tangerine-wallet-browser-daaac17be20faf3f53f3a4b04d70504ebf894568.zip
Fix dev tasks for multi browser copying
Diffstat (limited to 'gulpfile.js')
-rw-r--r--gulpfile.js25
1 files changed, 15 insertions, 10 deletions
diff --git a/gulpfile.js b/gulpfile.js
index 0d31eeb5b..96e5e11c7 100644
--- a/gulpfile.js
+++ b/gulpfile.js
@@ -64,7 +64,7 @@ copyTask({
source: './dist/firefox',
destination: './dist/chrome',
}), 'manifest:cleanup'))
-gulp.task('copy', gulp.series(gulp.parallel('copy:locales','copy:images','copy:fonts','copy:reload','copy:root'), 'copy:chrome'))
+gulp.task('copy', gulp.parallel('copy:locales','copy:images','copy:fonts','copy:reload','copy:root'))
gulp.task('copy:watch', function(){
gulp.watch(['./app/{_locales,images}/*', './app/scripts/chromereload.js', './app/*.{html,json}'], gulp.series('copy'))
})
@@ -91,16 +91,20 @@ gulp.task('default', ['lint'], function () {
// build js
-gulp.task('dev:js:inpage', bundleTask({ watch: true, filename: 'inpage.js' }))
-gulp.task('dev:js:contentscript', bundleTask({ watch: true, filename: 'contentscript.js' }))
-gulp.task('dev:js:background', bundleTask({ watch: true, filename: 'background.js' }))
-gulp.task('dev:js:popup', bundleTask({ watch: true, filename: 'popup.js' }))
-gulp.task('dev:js', gulp.parallel('dev:js:inpage','dev:js:contentscript','dev:js:background','dev:js:popup'))
+const jsFiles = [
+ 'inpage',
+ 'contentscript',
+ 'background',
+ 'popup',
+]
+
+jsFiles.forEach((jsFile) => {
+ gulp.task(`dev:js:${jsFile}`, bundleTask({ watch: true, filename: `${jsFile}.js` }))
+ gulp.task(`build:js:${jsFile}`, bundleTask({ watch: false, filename: `${jsFile}.js` }))
+})
+
+gulp.task('dev:js', gulp.parallel('dev:js:inpage','dev:js:contentscript','dev:js:background','dev:js:popup'))
-gulp.task('build:js:inpage', bundleTask({ watch: false, filename: 'inpage.js' }))
-gulp.task('build:js:contentscript', bundleTask({ watch: false, filename: 'contentscript.js' }))
-gulp.task('build:js:background', bundleTask({ watch: false, filename: 'background.js' }))
-gulp.task('build:js:popup', bundleTask({ watch: false, filename: 'popup.js' }))
gulp.task('build:js', gulp.parallel('build:js:inpage','build:js:contentscript','build:js:background','build:js:popup'))
// clean dist
@@ -182,6 +186,7 @@ function bundleTask(opts) {
// Add transformation tasks to the pipeline here.
.pipe(sourcemaps.write('./')) // writes .map file
.pipe(gulp.dest('./dist/firefox/scripts'))
+ .pipe(gulp.dest('./dist/chrome/scripts'))
.pipe(livereload())
)