Skip to content
Open
Show file tree
Hide file tree
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
3 changes: 2 additions & 1 deletion src/modules/compiler/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,8 @@
"scripts": {
"compile:src": "tsc --newLine LF",
"prexpublish": "npm run compile:src",
"deploy": "npm run compile:src && npm xpublish"
"deploy": "npm run compile:src && npm xpublish",
"xtest": "echo 'no xtests'"
},
"homepage": "https://github.com/compodoc/ngd-compiler",
"bugs": "https://github.com/compodoc/ngd-compiler/issues",
Expand Down
9 changes: 8 additions & 1 deletion src/modules/compiler/src/compiler.ts
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,14 @@ export class Compiler {
let visitNode = (visitedNode, index) => {
let name = this.getSymboleName(node);
let deps: Dependencies = <Dependencies>{};
let metadata = decorators[decorators.length - 1];
// could be more than one decorator. let's filter to one we need
let metadata;
if (decorators.length === 1) {
metadata = decorators[0]
} else {
const filteredDecorators = decorators.filter(d => /(NgModule|Component)/.test(node.expression?.expression?.text));
metadata = filteredDecorators[filteredDecorators.length - 1];
}
let props = this.findProps(visitedNode);

if (this.isModule(metadata)) {
Expand Down
1 change: 1 addition & 0 deletions src/modules/core/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
"scripts": {
"compile:src": "tsc --newLine LF",
"prexpublish": "npm run compile:src",
"xtest": "echo 'no xtests'",
"deploy": "npm run compile:src && npm xpublish"
},
"homepage": "https://github.com/compodoc/ngd",
Expand Down
1 change: 1 addition & 0 deletions src/modules/transformer/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
"scripts": {
"compile:src": "tsc --newLine LF",
"prexpublish": "npm run compile:src",
"xtest": "echo 'no xtests'",
"deploy": "npm run compile:src && npm xpublish"
},
"homepage": "https://github.com/compodoc/ngd",
Expand Down