mirror of
https://github.com/kremalicious/metamask-extension.git
synced 2024-12-23 09:52:26 +01:00
Adding trezor script/html to standardSubtask (build system) (#11874)
This commit is contained in:
parent
ddae14dab9
commit
cfac223fe8
@ -74,13 +74,21 @@ function createScriptTasks({ browserPlatforms, livereload }) {
|
|||||||
return { dev, test, testDev, prod };
|
return { dev, test, testDev, prod };
|
||||||
|
|
||||||
function createTasksForBuildJsExtension({ taskPrefix, devMode, testing }) {
|
function createTasksForBuildJsExtension({ taskPrefix, devMode, testing }) {
|
||||||
const standardEntryPoints = ['background', 'ui', 'phishing-detect'];
|
const standardEntryPoints = [
|
||||||
|
'background',
|
||||||
|
'ui',
|
||||||
|
'phishing-detect',
|
||||||
|
'content-script',
|
||||||
|
];
|
||||||
const standardSubtask = createTask(
|
const standardSubtask = createTask(
|
||||||
`${taskPrefix}:standardEntryPoints`,
|
`${taskPrefix}:standardEntryPoints`,
|
||||||
createFactoredBuild({
|
createFactoredBuild({
|
||||||
entryFiles: standardEntryPoints.map(
|
entryFiles: standardEntryPoints.map((label) => {
|
||||||
(label) => `./app/scripts/${label}.js`,
|
if (label === 'content-script') {
|
||||||
),
|
return './app/vendor/trezor/content-script.js';
|
||||||
|
}
|
||||||
|
return `./app/scripts/${label}.js`;
|
||||||
|
}),
|
||||||
devMode,
|
devMode,
|
||||||
testing,
|
testing,
|
||||||
browserPlatforms,
|
browserPlatforms,
|
||||||
@ -277,6 +285,15 @@ function createFactoredBuild({
|
|||||||
renderHtmlFile('background', groupSet, commonSet, browserPlatforms);
|
renderHtmlFile('background', groupSet, commonSet, browserPlatforms);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
case 'content-script': {
|
||||||
|
renderHtmlFile(
|
||||||
|
'trezor-usb-permissions',
|
||||||
|
groupSet,
|
||||||
|
commonSet,
|
||||||
|
browserPlatforms,
|
||||||
|
);
|
||||||
|
break;
|
||||||
|
}
|
||||||
default: {
|
default: {
|
||||||
throw new Error(`buildsys - unknown groupLabel "${groupLabel}"`);
|
throw new Error(`buildsys - unknown groupLabel "${groupLabel}"`);
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user