0.4.1 • Published 4 years ago

bb-plugin-add v0.4.1

Weekly downloads
4
License
ISC
Repository
github
Last release
4 years ago

bb-plugin-add

npm version Build Status

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
{
  "my-component":{
    "path":"./my-component"
  }
}

Usage

bb add component MyComponent

Keywords

# For example, edit template file like this
# Entity name is ${name}
export { default as ${name}} from "${name}"

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 - MYCOMPONENT
  • LOWERCASE MyComponent - mycomponent
  • HEAD_UPPER myComponent - MyComponent
  • HEAD_LOWER MyComponent - myComponent
  • GAP_HYPHEN MyComponent - -my-component
  • GAP_UNDERSCORE MyComponent - _my_component
  • CSS_CLASS_HYPHEN_STYLE MyComponent - my-component

Thanks

@feyy

License

MIT

0.4.1

4 years ago

0.4.0

4 years ago

0.3.1

5 years ago

0.3.0

5 years ago

0.2.16

6 years ago

0.2.15

6 years ago

0.2.14

6 years ago

0.2.12

6 years ago

0.2.11

6 years ago

0.2.10

6 years ago

0.2.9

6 years ago

0.2.8

6 years ago

0.2.7

6 years ago

0.2.6

6 years ago

0.2.4

6 years ago

0.2.2

6 years ago

0.2.0

6 years ago

0.1.0

6 years ago