Skip to content

Commit

Permalink
Merge pull request #620 from embroider-build/improved-layering
Browse files Browse the repository at this point in the history
Improved layering between app and tests bundles
  • Loading branch information
ef4 authored May 27, 2024
2 parents 89d4923 + aa30bff commit e47c6e7
Show file tree
Hide file tree
Showing 4 changed files with 275 additions and 147 deletions.
22 changes: 22 additions & 0 deletions packages/ember-auto-import/ts/bundle-config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,28 @@ export default class BundleConfig {
}
}

maybeBundleEntrypoint(
bundleName: string,
type: BundleType
): string | undefined {
if (this.isBuiltInBundleName(bundleName)) {
return this.bundleEntrypoint(bundleName, type);
}
return undefined;
}

bundleNameForEntrypoint(
entrypoint: string,
type: BundleType
): BundleName | undefined {
for (let name of this.names) {
if (entrypoint.endsWith(this.bundleEntrypoint(name, type))) {
return name;
}
}
return undefined;
}

bundleForTreeType(treeType: TreeType): BundleName {
switch (treeType) {
case 'app':
Expand Down
Loading

0 comments on commit e47c6e7

Please sign in to comment.