posthtml-bemy
This plugin improves the tiredness of writing HTML with MindBEMding using the power of posthtml.
This plugin is a different way than respecting posthtml-bem.
I recommend that you examine the difference of the method with posthtml-bem.
Before:
// Block appends "_" to the prefix.// Element appends "__" to the prefix.// Modifire appends "--" to the prefix.// Yes!! You don't have to add "Block" to the "Element" or "Modifire" prefix!!123something
After:
123something
Install
npm i posthtml posthtml-bemy
Usage
const fs = ;const posthtml = ;const posthtmlBemy = ;;
Options
name | description | type | etc |
---|---|---|---|
prest |
structural css naming style. the block prefix is " _ ". |
'suitecss' | default: 'bem' |
blockPrefix |
the prefix of the name representing the block in BEM. |
string | default: '_' |
elementPrefix |
the prefix of the name representing the element in BEM. |
string | default: '__' |
modifirePrefix |
the prefix of the name representing the modifire in BEM. |
string' | default: '--' |
suitecss prefix
// blockPrefix: "_"// elementPrefix: "-"// modifirePrefix: "--" ...
custom prefix
...