forked from Ineigo/bbgenerator
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbbgenerator.ts
executable file
·29 lines (24 loc) · 1.16 KB
/
bbgenerator.ts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
#!/usr/bin/env node
import chalk from 'chalk';
import program from 'commander';
import * as pj from './package.json';
const version: string = (<any>pj).version;
const description: string = (<any>pj).description;
program
.version(version)
.usage('[options] <componentName>')
.description(description)
.command('component [options] [name]', 'Создает компонет')
.command('view [options] [componentName]', 'Создает View')
.command('collection-view [options] [componentName]', 'Создает CollectionView')
.command('model [options] [componentName]', 'Создает модель')
.command('collection [options] [componentName]', 'Создает коллекцию')
.command('style [options] [componentName]', 'Создает файл стилей')
.command('template [options] [componentName]', 'Создает файл шаблона')
.command('ui [options] [name]', 'Интерфейс для создания сущности', { isDefault: true })
.parse(process.argv);
function init(): void {
console.log(chalk.bold.blue('Marionette-Backbone Generator', '- v' + version));
console.log();
}
init();