ba

b_add

A small cli utility helps you to easily add BEM-blocks in the file system of your project

Showing:

Popularity

Downloads/wk

18

GitHub Stars

7

Maintenance

Last Commit

5yrs ago

Contributors

2

Package

Dependencies

3

Size (min+gzip)

2.5KB

License

MIT

Type Definitions

Tree-Shakeable

No?

Categories

Readme

b-add

A small cli utility helps you to easily add BEM-blocks in the file system of your project

Features

  • Automatic creation of files and directories
  • Configuring file extensions for each type of BEM class (block, element and their modifiers)
  • Setting separators for modifiers and elements

Using

user:~/project$ b_add logo__img_size_big container__sidebar
user:~/project$ tree

├── app
│   └── blocks
│       ├── container
│       │   ├── __sidebar
│       │   │   ├── container__sidebar.jade
│       │   │   └── container__sidebar.styl
│       │   ├── container.jade
│       │   ├── container.styl
│       │   └── container.wiki
│       └── logo
│           ├── __img
│           │   ├── logo__img.jade
│           │   ├── logo__img.styl
│           │   └── logo__img_size_big.styl
│           ├── logo.jade
│           ├── logo.styl
│           └── logo.wiki

Installation

root:~$ npm install -g b_add

Settings

All options are available in the file b_add.json

blockLocation The path to the folder with blocks

elem The separator for the element

mod The separator for the modifier

files Settings extensions for files

  • block An array of file extensions block
  • blockMod An array of file extensions block modifier
  • elem Массив расширений файлов элемента
  • elemMod An array of file extensions element
{
  "blockLocation": "./app/blocks/",
  "elem": "__",
  "mod": "_",
  "files": {
    "block": [".styl", ".jade", ".wiki"],
    "blockMod": [".styl"],
    "elem": [".styl", ".jade"],
    "elemMod": [".styl"]
  }
}

License

Project distributed under the MIT license. For more information, see file LICENSE

Used modules

"Yandex.Metrika counter"

Rate & Review

Great Documentation0
Easy to Use0
Performant0
Highly Customizable0
Bleeding Edge0
Responsive Maintainers0
Poor Documentation0
Hard to Use0
Slow0
Buggy0
Abandoned0
Unwelcoming Community0
100