How to use the @embroider/macros.MacrosConfig.reset function in @embroider/macros

To help you get started, we’ve selected a few @embroider/macros examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github embroider-build / embroider / test-packages / support / build.ts View on Github external
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;
    }

@embroider/macros

Standardized build-time macros for ember apps.

MIT
Latest version published 3 days ago

Package Health Score

83 / 100
Full package analysis