Skip to content

Commit

Permalink
Merge pull request #710 from thoov/autorun-false
Browse files Browse the repository at this point in the history
  • Loading branch information
rwjblue authored Mar 4, 2021
2 parents c65cda3 + affa2ed commit 1806752
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion packages/compat/src/v1-appboot.ts
Original file line number Diff line number Diff line change
Expand Up @@ -22,17 +22,19 @@ export class WriteV1AppBoot extends Plugin {

export class ReadV1AppBoot extends Plugin {
private appBoot: string | undefined;
private hasBuilt = false;
constructor(appBootTree: Node) {
super([appBootTree], {
persistentOutput: true,
});
}
build() {
this.appBoot = readFileSync(join(this.inputPaths[0], `config/app-boot.js`), 'utf8');
this.hasBuilt = true;
}

readAppBoot() {
if (!this.appBoot) {
if (!this.hasBuilt) {
throw new Error(`AppBoot not available until after the build`);
}
return this.appBoot;
Expand Down

0 comments on commit 1806752

Please sign in to comment.