Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make component ready on afterScopeCreate #843

Merged
merged 1 commit into from
Jul 14, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion src/Program.ts
Original file line number Diff line number Diff line change
Expand Up @@ -159,7 +159,6 @@ export class Program {

protected addScope(scope: Scope) {
this.scopes[scope.name] = scope;
this.plugins.emit('afterScopeCreate', scope);
}

/**
Expand Down Expand Up @@ -474,6 +473,8 @@ export class Program {
//register this compoent now that we have parsed it and know its component name
this.registerComponent(xmlFile, scope);

//notify plugins that the scope is created and the component is registered
this.plugins.emit('afterScopeCreate', scope);
} else {
//TODO do we actually need to implement this? Figure out how to handle img paths
// let genericFile = this.files[srcPath] = <any>{
Expand Down Expand Up @@ -561,6 +562,7 @@ export class Program {
const sourceScope = new Scope('source', this, 'scope:source');
sourceScope.attachDependencyGraph(this.dependencyGraph);
this.addScope(sourceScope);
this.plugins.emit('afterScopeCreate', sourceScope);
}
}

Expand Down