How to use the @embroider/core.WaitForTrees function in @embroider/core

To help you get started, we’ve selected a few @embroider/core 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 / packages / compat / src / compat-addons.ts View on Github external
constructor(legacyEmberAppInstance: object, maybeOptions?: Options) {
    let options = optionsWithDefaults(maybeOptions);
    if (options && options.workspaceDir) {
      ensureDirSync(options.workspaceDir);
      this.destDir = realpathSync(options.workspaceDir);
    } else {
      this.destDir = realpathSync(mkdtempSync(join(tmpdir(), 'embroider-')));
    }
    let v1Cache = V1InstanceCache.forApp(legacyEmberAppInstance, options);
    this.packageCache = v1Cache.packageCache.moveAddons(v1Cache.app.root, this.destDir);
    let movedAddons = [...this.packageCache.moved.keys()].map(oldPkg => buildCompatAddon(oldPkg, v1Cache));
    let { synthVendor, synthStyles } = this.getSyntheticPackages(v1Cache.app, movedAddons);
    this.tree = new WaitForTrees({ movedAddons, synthVendor, synthStyles }, '@embroider/compat/addons', this.build.bind(this));
    this.inputPath = v1Cache.app.root;
  }