Skip to content

Commit bf649ab

Browse files
committed
feat(gen): add component generator
closes #1711
1 parent 63fb77f commit bf649ab

File tree

2 files changed

+15
-0
lines changed

2 files changed

+15
-0
lines changed

Diff for: src/generators/app/index.js

+1
Original file line numberDiff line numberDiff line change
@@ -387,6 +387,7 @@ export class Generator extends Base {
387387
'directiveDirectory': appPath,
388388
'filterDirectory': appPath,
389389
'serviceDirectory': appPath,
390+
'componentDirectory': `${appPath}components/`,
390391
'filters': filters,
391392
'extensions': extensions,
392393
'basePath': 'client',

Diff for: src/generators/component/index.js

+14
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
'use strict';
2+
import {Base} from 'yeoman-generator';
3+
4+
class Generator extends Base {
5+
compose() {
6+
this.composeWith('ng-component:component', {
7+
arguments: this.arguments
8+
}, {
9+
local: require.resolve('generator-ng-component/component')
10+
});
11+
}
12+
}
13+
14+
module.exports = Generator;

0 commit comments

Comments
 (0)