bb-plugin-add
A self-defining module generator plugin for bb-mt
Get Start
First, you should install bb and this plugin:
$ npm install -g bb-mt bb-plugin-add
Next, create your own project folder and run init:
$ mkdir my-project && cd my-project$ bb init
Now, We find .tpl in root path.
$ cd .tpl
Then, create config.json:
# config.json }
Usage
bb add component MyComponent
Keywords
# For example, edit template file like this # Entity name is ${name} export
Build-in Keywords
You can use build-in keywords below:
name
Your entity name.datetime
Datetime in os.fullname
Username in os.gitname
Username in git.email
Email of git.
Self-defining Keywords
You can set up self-defining keywords in config.json
Build-in Functions
UPPERCASE
MyComponent - MYCOMPONENTLOWERCASE
MyComponent - mycomponentHEAD_UPPER
myComponent - MyComponentHEAD_LOWER
MyComponent - myComponentGAP_HYPHEN
MyComponent - -my-componentGAP_UNDERSCORE
MyComponent - _my_componentCSS_CLASS_HYPHEN_STYLE
MyComponent - my-component
Thanks
@feyy
License
MIT