Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
static async build(project: Project, params: Partial) {
MacrosConfig.reset();
let paramsWithDefaults: BuildParams = Object.assign({}, params, defaultParams);
project.writeSync();
let instance;
if (paramsWithDefaults.type === 'addon') {
instance = emberAddon(project.baseDir, params.emberAppOptions);
} else {
instance = emberApp(project.baseDir, params.emberAppOptions);
}
let addons = new Addons(instance, params.embroiderOptions);
let tree;
if (params.stage === 1) {
tree = addons.tree;
} else {
let compatApp = new App(instance, addons, params.embroiderOptions);
tree = compatApp.tree;
}