Skip to content

Commit

Permalink
Make component ready on afterScopeCreate (#843)
Browse files Browse the repository at this point in the history
  • Loading branch information
iBicha authored Jul 14, 2023
1 parent 317d730 commit cba7db7
Showing 1 changed file with 3 additions and 1 deletion.
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

0 comments on commit cba7db7

Please sign in to comment.