aboutsummaryrefslogtreecommitdiffstats
path: root/gulpfile.js
diff options
context:
space:
mode:
authorkumavis <aaron@kumavis.me>2017-01-11 05:08:13 +0800
committerkumavis <aaron@kumavis.me>2017-01-11 05:08:13 +0800
commit464b7d581424c04340281878a2a0f20e73bf8188 (patch)
tree37c445dc244e1b49fd9f67d0ce4e6b2603133e28 /gulpfile.js
parentaf312bdc90139f99a9a08f9d0f67d63e005e2a20 (diff)
downloadtangerine-wallet-browser-464b7d581424c04340281878a2a0f20e73bf8188.tar
tangerine-wallet-browser-464b7d581424c04340281878a2a0f20e73bf8188.tar.gz
tangerine-wallet-browser-464b7d581424c04340281878a2a0f20e73bf8188.tar.bz2
tangerine-wallet-browser-464b7d581424c04340281878a2a0f20e73bf8188.tar.lz
tangerine-wallet-browser-464b7d581424c04340281878a2a0f20e73bf8188.tar.xz
tangerine-wallet-browser-464b7d581424c04340281878a2a0f20e73bf8188.tar.zst
tangerine-wallet-browser-464b7d581424c04340281878a2a0f20e73bf8188.zip
gulp - clean and simplify
Diffstat (limited to 'gulpfile.js')
-rw-r--r--gulpfile.js38
1 files changed, 15 insertions, 23 deletions
diff --git a/gulpfile.js b/gulpfile.js
index ca69b36a8..9f55e99a8 100644
--- a/gulpfile.js
+++ b/gulpfile.js
@@ -193,26 +193,10 @@ gulp.task('clean', function clean() {
})
// zip tasks for distribution
-gulp.task('zip:chrome', () => {
- return gulp.src('dist/chrome/**')
- .pipe(zip(`metamask-chrome-${manifest.version}.zip`))
- .pipe(gulp.dest('builds'));
-})
-gulp.task('zip:firefox', () => {
- return gulp.src('dist/firefox/**')
- .pipe(zip(`metamask-firefox-${manifest.version}.zip`))
- .pipe(gulp.dest('builds'));
-})
-gulp.task('zip:edge', () => {
- return gulp.src('dist/edge/**')
- .pipe(zip(`metamask-edge-${manifest.version}.zip`))
- .pipe(gulp.dest('builds'));
-})
-gulp.task('zip:opera', () => {
- return gulp.src('dist/opera/**')
- .pipe(zip(`metamask-opera-${manifest.version}.zip`))
- .pipe(gulp.dest('builds'));
-})
+gulp.task('zip:chrome', zipTask('chrome'))
+gulp.task('zip:firefox', zipTask('firefox'))
+gulp.task('zip:edge', zipTask('edge'))
+gulp.task('zip:opera', zipTask('opera'))
gulp.task('zip', gulp.parallel('zip:chrome', 'zip:firefox', 'zip:edge', 'zip:opera'))
// high level tasks
@@ -243,15 +227,23 @@ function copyTask(opts){
}
}
+function zipTask(target) {
+ return () => {
+ return gulp.src(`dist/${target}/**`)
+ .pipe(zip(`metamask-${target}-${manifest.version}.zip`))
+ .pipe(gulp.dest('builds'));
+ }
+}
+
function bundleTask(opts) {
var browserifyOpts = assign({}, watchify.args, {
entries: ['./app/scripts/'+opts.filename],
- debug: true,
plugin: 'browserify-derequire',
+ debug: debug,
+ fullPaths: debug,
})
var bundler = browserify(browserifyOpts)
- bundler.transform('brfs')
if (opts.watch) {
bundler = watchify(bundler)
bundler.on('update', performBundle) // on any dep update, runs the bundler
@@ -281,7 +273,7 @@ function bundleTask(opts) {
.pipe(gulp.dest('./dist/chrome/scripts'))
.pipe(gulp.dest('./dist/edge/scripts'))
.pipe(gulp.dest('./dist/opera/scripts'))
- .pipe(gulpif(!disableLiveReload,livereload()))
+ .pipe(gulpif(!disableLiveReload, livereload()))
)
}