Skip to content

Commit 24c9448

Browse files
committed
fix(angular): sort using tag-name
1 parent 483a269 commit 24c9448

1 file changed

Lines changed: 7 additions & 3 deletions

File tree

src/compiler/distribution/dist-angular.ts

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -18,8 +18,8 @@ function getComponents(excludeComponents: string[], cmpRegistry: d.ComponentRegi
1818
.map(key => cmpRegistry[key])
1919
.filter(c => !excludeComponents.includes(c.tagNameMeta))
2020
.sort((a, b) => {
21-
if (a.componentClass < b.componentClass) return -1;
22-
if (a.componentClass > b.componentClass) return 1;
21+
if (a.tagNameMeta < b.tagNameMeta) return -1;
22+
if (a.tagNameMeta > b.tagNameMeta) return 1;
2323
return 0;
2424
});
2525
}
@@ -249,7 +249,11 @@ function relativeImport(config: d.Config, pathFrom: string, pathTo: string) {
249249
}
250250

251251
function angularArray(components: d.ComponentMeta[], proxyPath: string) {
252-
const directives = components.map(cmpMeta => `d.${cmpMeta.componentClass}`).join(',\n ');
252+
const directives = components
253+
.map(cmpMeta => dashToPascalCase(cmpMeta.tagNameMeta))
254+
.map(className => `d.${className}`)
255+
.join(',\n ');
256+
253257
return `
254258
import * as d from '${proxyPath}';
255259

0 commit comments

Comments
 (0)