How to use the @embroider/core.Package 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 / dummy-package.ts View on Github external
get dependencies(): Package[] {
    // we can't use this.owningAddon.dependencies because that won't include
    // devDeps. We need to construct a new temporary package with the
    // mayUseDevDeps flag to true.
    let upstream = new Package(this.owningAddon.root, this.packageCache, true).dependencies.slice();
    // the dummy app has a dependency on the owning addon
    upstream.unshift(this.owningAddon);
    return upstream;
  }
}
github embroider-build / embroider / packages / compat / src / moved-package-cache.ts View on Github external
private movedPackage(originalPkg: Package): Package {
    let newRoot = this.localPath(originalPkg.root);
    return getOrCreate(this.rootCache, newRoot, () => new Package(newRoot, this, false));
  }