bem-jade-legacy
v0.1.2
Published
Smart mixins for writing BEM in Jade
Downloads
4
Readme
This is a refactored fork of bemto, see bemto/README.md for syntax of mixins +b
and +e
.
Template:
include bem
+b.foo
+e.bar baz
(need to make sure the interpreter can find bem.jade
from this module).
JS:
var bem = require('bem-jade-legacy');
var jade = reqiure('jade');
var result = jade.renderFile('filename.jade', {
bem: bem(),
name: 'Joe'
});
The compiled function is still larger than pure jade equivalent, but gzips pretty good (lots of repetition), so the overhead is under 20%.
The original bem.jade
is not suited for client-side.