1 | var generator = require('custom-template-generator');
|
2 |
|
3 | module.exports = function componentCommand(program) {
|
4 |
|
5 | 'use strict';
|
6 |
|
7 | program
|
8 | .command('component <name>')
|
9 | .description('Generate a component in ./app/components/')
|
10 | .action(function(name, command) {
|
11 |
|
12 |
|
13 | generator({
|
14 | componentName: name,
|
15 | customTemplatesUrl: './templates/',
|
16 | dest: './app/components',
|
17 | templateName: 'component',
|
18 | showPrompt: false
|
19 | });
|
20 |
|
21 | program.log('Generated new component');
|
22 |
|
23 | });
|
24 |
|
25 | };
|