bem2ng
Version:
Create Angular 2 component from BEM blocks
20 lines (16 loc) • 893 B
JavaScript
import program from 'commander';
import { bem2ng } from './create_component';
// bem2ng.config({ lang: 'ru' });
program
.arguments('<action>')
.usage('(create|update) [options]')
.description('Create or Update Angular2 component from BEM block')
.option('-b, --block <block>', 'Use BEM block\'s name to create Angular2 component')
.option('-s, --style [style]', 'Update only style file of Angular2 component')
.option('-t, --template [template]', 'Update only template file of Angular2 component')
.option('-a, --all [all]', 'Update style & template files of Angular2 component')
.option('--global-style, --move-global-style [globalStyle]',
'Copy global styles from BEM SRC to Angular2 SRC indicating relative path to folder where it will be created')
.action(action => bem2ng.make(program, action))
.parse(process.argv);