Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
console.log('Starting build');
const version = await getExtensionVersion(options.version);
process.env.PACKAGE_VERSION = version;
process.env.EXTENSION_VERSION = version;
if (!process.env.VERSION) {
process.env.VERSION = version;
}
const builder = getBroccoliBuilder(OUTPUT_PATH);
try {
await builder.build();
syncBuildFolder(builder, OUTPUT_PATH);
onBuildSuccess(builder, new UI()); // display slow-trees
} catch (ex) {
console.error(ex);
process.exit(1);
} finally {
await builder.cleanup();
}
// It seems that on fresh builds, process hangs here. Looking at upstream
// source-code of broccoli project, they also explicitely call
// `process.exit(0)` at the end of build. It would be nice to know why
// this is needed though.
process.exit(0);
});
};