|
|
@ -311,6 +311,7 @@ const buildJsFiles = [ |
|
|
|
// bundle tasks
|
|
|
|
// bundle tasks
|
|
|
|
createTasksForBuildJsUIDeps({ dependenciesToBundle: uiDependenciesToBundle, filename: 'libs' }) |
|
|
|
createTasksForBuildJsUIDeps({ dependenciesToBundle: uiDependenciesToBundle, filename: 'libs' }) |
|
|
|
createTasksForBuildJsExtension({ buildJsFiles, taskPrefix: 'dev:extension:js', devMode: true }) |
|
|
|
createTasksForBuildJsExtension({ buildJsFiles, taskPrefix: 'dev:extension:js', devMode: true }) |
|
|
|
|
|
|
|
createTasksForBuildJsExtension({ buildJsFiles, taskPrefix: 'dev:test-extension:js', devMode: true, testing: 'true' }) |
|
|
|
createTasksForBuildJsExtension({ buildJsFiles, taskPrefix: 'build:extension:js' }) |
|
|
|
createTasksForBuildJsExtension({ buildJsFiles, taskPrefix: 'build:extension:js' }) |
|
|
|
|
|
|
|
|
|
|
|
function createTasksForBuildJsUIDeps ({ dependenciesToBundle, filename }) { |
|
|
|
function createTasksForBuildJsUIDeps ({ dependenciesToBundle, filename }) { |
|
|
@ -334,7 +335,7 @@ function createTasksForBuildJsUIDeps ({ dependenciesToBundle, filename }) { |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
function createTasksForBuildJsExtension ({ buildJsFiles, taskPrefix, devMode, bundleTaskOpts = {} }) { |
|
|
|
function createTasksForBuildJsExtension ({ buildJsFiles, taskPrefix, devMode, testing, bundleTaskOpts = {} }) { |
|
|
|
// inpage must be built before all other scripts:
|
|
|
|
// inpage must be built before all other scripts:
|
|
|
|
const rootDir = './app/scripts' |
|
|
|
const rootDir = './app/scripts' |
|
|
|
const nonInpageFiles = buildJsFiles.filter(file => file !== 'inpage') |
|
|
|
const nonInpageFiles = buildJsFiles.filter(file => file !== 'inpage') |
|
|
@ -348,6 +349,7 @@ function createTasksForBuildJsExtension ({ buildJsFiles, taskPrefix, devMode, bu |
|
|
|
buildWithFullPaths: devMode, |
|
|
|
buildWithFullPaths: devMode, |
|
|
|
watch: devMode, |
|
|
|
watch: devMode, |
|
|
|
devMode, |
|
|
|
devMode, |
|
|
|
|
|
|
|
testing, |
|
|
|
}, bundleTaskOpts) |
|
|
|
}, bundleTaskOpts) |
|
|
|
createTasksForBuildJs({ rootDir, taskPrefix, bundleTaskOpts, destinations, buildPhase1, buildPhase2 }) |
|
|
|
createTasksForBuildJs({ rootDir, taskPrefix, bundleTaskOpts, destinations, buildPhase1, buildPhase2 }) |
|
|
|
} |
|
|
|
} |
|
|
@ -412,7 +414,7 @@ gulp.task('dev:test', |
|
|
|
'clean', |
|
|
|
'clean', |
|
|
|
'dev:scss', |
|
|
|
'dev:scss', |
|
|
|
gulp.parallel( |
|
|
|
gulp.parallel( |
|
|
|
'dev:extension:js', |
|
|
|
'dev:test-extension:js', |
|
|
|
'test:copy', |
|
|
|
'test:copy', |
|
|
|
'dev:reload' |
|
|
|
'dev:reload' |
|
|
|
) |
|
|
|
) |
|
|
@ -496,6 +498,7 @@ function generateBundler (opts, performBundle) { |
|
|
|
bundler.transform(envify({ |
|
|
|
bundler.transform(envify({ |
|
|
|
METAMASK_DEBUG: opts.devMode, |
|
|
|
METAMASK_DEBUG: opts.devMode, |
|
|
|
NODE_ENV: opts.devMode ? 'development' : 'production', |
|
|
|
NODE_ENV: opts.devMode ? 'development' : 'production', |
|
|
|
|
|
|
|
IN_TEST: opts.testing, |
|
|
|
PUBNUB_SUB_KEY: process.env.PUBNUB_SUB_KEY || '', |
|
|
|
PUBNUB_SUB_KEY: process.env.PUBNUB_SUB_KEY || '', |
|
|
|
PUBNUB_PUB_KEY: process.env.PUBNUB_PUB_KEY || '', |
|
|
|
PUBNUB_PUB_KEY: process.env.PUBNUB_PUB_KEY || '', |
|
|
|
}), { |
|
|
|
}), { |
|
|
|