mirror of
https://github.com/hensm/fx_cast.git
synced 2026-06-11 18:19:58 +00:00
Re-write app build, created macOS installer package
This commit is contained in:
24
ext/build.js
24
ext/build.js
@@ -1,11 +1,19 @@
|
||||
const { spawn } = require('child_process');
|
||||
const argv = require('minimist')(process.argv.slice(2));
|
||||
const fs = require("fs-extra");
|
||||
const path = require("path");
|
||||
const { spawn } = require("child_process");
|
||||
const argv = require("minimist")(process.argv.slice(2));
|
||||
|
||||
|
||||
const extensionName = "fx_cast";
|
||||
const extensionId = "fx_cast@matt.tf";
|
||||
const extensionVersion = "0.0.1";
|
||||
|
||||
|
||||
if (argv.package) {
|
||||
argv.mode = "production";
|
||||
argv.watch = false;
|
||||
}
|
||||
|
||||
// Default argument values
|
||||
const { mirroringAppId = "19A6F4AE"
|
||||
, mode = "development" } = argv;
|
||||
@@ -18,12 +26,16 @@ const child = spawn(
|
||||
+ `--mode=${mode} `
|
||||
+ `${argv.watch ? "--watch" : ""} `
|
||||
+ `&& web-ext build --overwrite-dest `
|
||||
+ `--source-dir ../dist/ext `
|
||||
+ `--source-dir ../dist/ext/unpacked `
|
||||
+ `--artifacts-dir ../dist/ext `
|
||||
, {
|
||||
shell: true
|
||||
}
|
||||
, { shell: true }
|
||||
);
|
||||
|
||||
child.stdout.pipe(process.stdout);
|
||||
child.stderr.pipe(process.stderr);
|
||||
|
||||
child.on("exit", () => {
|
||||
if (argv.package) {
|
||||
fs.remove(path.join(__dirname, "../dist/ext/unpacked"));
|
||||
}
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user