Skip to content

Commit

Permalink
feat(new app-boot): clean-up unused ember-app-boot.js
Browse files Browse the repository at this point in the history
  • Loading branch information
BlueCutOfficial committed Jun 13, 2024
1 parent 08e33e7 commit ae5593a
Show file tree
Hide file tree
Showing 3 changed files with 0 additions and 67 deletions.
5 changes: 0 additions & 5 deletions packages/compat/src/compat-app-builder.ts
Original file line number Diff line number Diff line change
Expand Up @@ -488,7 +488,6 @@ export class CompatAppBuilder {
this.addResolverConfig(resolverConfig);
this.addContentForConfig(contentForConfig);
this.addEmberEnvConfig(config.EmberENV);
this.addAppBoot(this.compatApp.appBoot.readAppBoot());
this.outputAppBootError(config.modulePrefix, config.APP, contentForConfig);
let babelConfig = await this.babelConfig(resolverConfig);
this.addBabelConfig(babelConfig);
Expand Down Expand Up @@ -602,10 +601,6 @@ export class CompatAppBuilder {
});
}

private addAppBoot(appBoot?: string) {
writeFileSync(join(locateEmbroiderWorkingDir(this.compatApp.root), 'ember-app-boot.js'), appBoot ?? '');
}

// Classic addons providing custom content-for "app-boot" is no longer supported.
// The purpose of this error message is to help developers to move the classic addons code.
// Developers can deactivate it with useAddonAppBoot build option.
Expand Down
18 changes: 0 additions & 18 deletions packages/compat/src/compat-app.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@ import { WatchedDir } from 'broccoli-source';
import resolve from 'resolve';
import ContentForConfig from './content-for-config';
import { V1Config } from './v1-config';
import { WriteV1AppBoot, ReadV1AppBoot } from './v1-appboot';
import type { AddonMeta, EmberAppInstance, OutputFileToInputFileMap, PackageInfo } from '@embroider/core';
import { writeJSONSync, ensureDirSync, copySync, pathExistsSync, existsSync, writeFileSync } from 'fs-extra';
import AddToTree from './add-to-tree';
Expand Down Expand Up @@ -164,22 +163,6 @@ export default class CompatApp {
return this.legacyEmberAppInstance.options.autoRun;
}

@Memoize()
get appBoot(): ReadV1AppBoot {
let env = this.legacyEmberAppInstance.env;
let appBootContentTree = new WriteV1AppBoot();

let patterns = this.configReplacePatterns;

appBootContentTree = new this.configReplace(appBootContentTree, this.configTree, {
configPath: join('environments', `${env}.json`),
files: ['config/app-boot.js'],
patterns,
});

return new ReadV1AppBoot(appBootContentTree);
}

private get storeConfigInMeta(): boolean {
return this.legacyEmberAppInstance.options.storeConfigInMeta;
}
Expand Down Expand Up @@ -747,7 +730,6 @@ export default class CompatApp {
publicTree,
configTree,
contentForTree,
appBootTree: this.appBoot,
prevStageTree,
};
}
Expand Down
44 changes: 0 additions & 44 deletions packages/compat/src/v1-appboot.ts

This file was deleted.

0 comments on commit ae5593a

Please sign in to comment.