bem-tools-core
bem-tools-core
is a CLI runner for its plugins.
Plugins are npm
packages exporting COA command. By convention they should be named with bem-tools-
prefix so bem-tools-core
may find them among other packages.
Plugins
Each plugin provides JS API and exports COA command via cli.js
file to be used with bem-tools-core
.
Available plugins list
- bem-tools-create — creates blocks, elements and modifiers on file system according to FS scheme.
- bem-tools-find — finds BEM entities on FS according to bem-config settings.
- bem-tools-make — at the moment it's a proxy to ENB make.
List of work-in-progress plugins
- bem-tools-init — to create project stub.
- bem-tools-cp — to copy BEM entities.
- bem-tools-rm — to remove BEM entities.
- bem-tools-mv — to rename BEM entities.
- bem-tools-hint — wrapper for bemhint.
How to create your own plugin
- Plugin should be named with
bem-tools-
prefix. - By convention each plugin should be available as JS API (so it may be used without
bem-tools-core
). You may export plugin functionality fromindex.js
file in the root of your package. - Plugin should provide
COA
command viacli.js
file:
module { this title'Title of your plugin' name'foo' title'Foo' name'bar'title'Bar' ;};
For more info about COA please refer to https://www.npmjs.com/package/coa.