aboutsummaryrefslogtreecommitdiffstats
path: root/gulpfile.js
diff options
context:
space:
mode:
authorkumavis <aaron@kumavis.me>2018-03-30 13:34:59 +0800
committerkumavis <aaron@kumavis.me>2018-03-30 13:34:59 +0800
commit433bb0f01ae3631774191f8ed802eb7f2f04a552 (patch)
treec4be4b96a889da095f63626514c0b26667c7cf10 /gulpfile.js
parentedd70bd13e514013073f75ff005bddf6f6a568a9 (diff)
downloadtangerine-wallet-browser-433bb0f01ae3631774191f8ed802eb7f2f04a552.tar
tangerine-wallet-browser-433bb0f01ae3631774191f8ed802eb7f2f04a552.tar.gz
tangerine-wallet-browser-433bb0f01ae3631774191f8ed802eb7f2f04a552.tar.bz2
tangerine-wallet-browser-433bb0f01ae3631774191f8ed802eb7f2f04a552.tar.lz
tangerine-wallet-browser-433bb0f01ae3631774191f8ed802eb7f2f04a552.tar.xz
tangerine-wallet-browser-433bb0f01ae3631774191f8ed802eb7f2f04a552.tar.zst
tangerine-wallet-browser-433bb0f01ae3631774191f8ed802eb7f2f04a552.zip
build - split primary tasks into metamask + extension * dev + build
Diffstat (limited to 'gulpfile.js')
-rw-r--r--gulpfile.js62
1 files changed, 55 insertions, 7 deletions
diff --git a/gulpfile.js b/gulpfile.js
index 910441e4d..647abb6d2 100644
--- a/gulpfile.js
+++ b/gulpfile.js
@@ -69,7 +69,7 @@ createCopyTasks('images', {
destinations: commonPlatforms.map(platform => `./dist/${platform}/images`),
})
createCopyTasks('contractImages', {
- source: `${require.resolve('eth-contract-metadata')}/images/`,
+ source: './node_modules/eth-contract-metadata/images/',
destinations: commonPlatforms.map(platform => `./dist/${platform}/images/contract`),
})
createCopyTasks('fonts', {
@@ -293,9 +293,10 @@ const buildJsFiles = [
]
// bundle tasks
-createTasksForBuildJsExtension({ buildJsFiles, taskPrefix: 'dev:js', devMode: true })
-createTasksForBuildJsExtension({ buildJsFiles, taskPrefix: 'build:js:extension' })
-createTasksForBuildJsMascara({ taskPrefix: 'build:js:mascara' })
+createTasksForBuildJsExtension({ buildJsFiles, taskPrefix: 'dev:extension:js', devMode: true })
+createTasksForBuildJsExtension({ buildJsFiles, taskPrefix: 'build:extension:js' })
+createTasksForBuildJsMascara({ taskPrefix: 'build:mascara:js' })
+createTasksForBuildJsMascara({ taskPrefix: 'dev:mascara:js', devMode: true })
function createTasksForBuildJsExtension({ buildJsFiles, taskPrefix, devMode, bundleTaskOpts = {} }) {
// inpage must be built before all other scripts:
@@ -382,7 +383,32 @@ gulp.task('dev',
'clean',
'dev:scss',
gulp.parallel(
- 'dev:js',
+ 'dev:extension:js',
+ 'dev:mascara:js',
+ 'dev:copy',
+ 'dev:reload'
+ )
+ )
+)
+
+gulp.task('dev:extension',
+ gulp.series(
+ 'clean',
+ 'dev:scss',
+ gulp.parallel(
+ 'dev:extension:js',
+ 'dev:copy',
+ 'dev:reload'
+ )
+ )
+)
+
+gulp.task('dev:mascara',
+ gulp.series(
+ 'clean',
+ 'dev:scss',
+ gulp.parallel(
+ 'dev:mascara:js',
'dev:copy',
'dev:reload'
)
@@ -394,8 +420,30 @@ gulp.task('build',
'clean',
'build:scss',
gulp.parallel(
- 'build:js:extension',
- // 'build:js:mascara',
+ 'build:extension:js',
+ 'build:mascara:js',
+ 'copy'
+ )
+ )
+)
+
+gulp.task('build:extension',
+ gulp.series(
+ 'clean',
+ 'build:scss',
+ gulp.parallel(
+ 'build:extension:js',
+ 'copy'
+ )
+ )
+)
+
+gulp.task('build:mascara',
+ gulp.series(
+ 'clean',
+ 'build:scss',
+ gulp.parallel(
+ 'build:mascara:js',
'copy'
)
)