mirror of
https://github.com/hensm/fx_cast.git
synced 2026-06-11 10:09:59 +00:00
Update to webpack 4 + misc build process changes
This commit is contained in:
29
ext/build.js
29
ext/build.js
@@ -1,20 +1,29 @@
|
||||
const spawn = require('child_process').spawn;
|
||||
const { spawn } = require('child_process');
|
||||
const argv = require('minimist')(process.argv.slice(2));
|
||||
|
||||
const appId = argv.appId || "19A6F4AE";
|
||||
|
||||
const extensionName = "fx_cast";
|
||||
const extensionId = "fx_cast@matt.tf";
|
||||
const extensionVersion = "0.0.1";
|
||||
|
||||
// Default argument values
|
||||
const { mirroringAppId = "19A6F4AE"
|
||||
, mode = "development" } = argv;
|
||||
|
||||
const child = spawn(
|
||||
`webpack --env.appId=${appId} `
|
||||
+ '&& web-ext build '
|
||||
+ '--overwrite-dest '
|
||||
+ '--source-dir '
|
||||
+ '../dist/ext/unpacked '
|
||||
+ '--artifacts-dir '
|
||||
+ '../dist/ext '
|
||||
+ '&& mv ../dist/ext/*.zip ../dist/ext/ext.xpi'
|
||||
`webpack --env.extensionName=${extensionName} `
|
||||
+ `--env.extensionId=${extensionId} `
|
||||
+ `--env.extensionVersion=${extensionVersion} `
|
||||
+ `--env.mirroringAppId=${mirroringAppId} `
|
||||
+ `--mode=${mode} `
|
||||
+ `${argv.watch ? "--watch" : ""} `
|
||||
+ `&& web-ext build --overwrite-dest `
|
||||
+ `--source-dir ../dist/ext `
|
||||
+ `--artifacts-dir ../dist/ext `
|
||||
, {
|
||||
shell: true
|
||||
}
|
||||
);
|
||||
|
||||
child.stdout.pipe(process.stdout);
|
||||
child.stderr.pipe(process.stderr);
|
||||
|
||||
Reference in New Issue
Block a user