UNPKG

864 BMarkdownView Raw
1# jadum
2
3> A lean Jade compiler that understands Browserify and reuses partials
4
5Works just like `jade`, except that the CLI compiles views producing a syntax like below.
6
7```js
8module.exports = function (model) {
9 // view rendering...
10}
11```
12
13The other difference is that the traditional Jade compiler inlines partials when it finds `include` statements, whereas `jadum` uses `require` statements to reuse partials, saving precious bytes in client-side code.
14
15## Install
16
17```shell
18npm install -S jadum
19```
20
21## CLI
22
23The CLI works the same way as the one in `jade`, but it always compiles views for the client-side, as Common.JS modules.
24
25```shell
26jadum views/**/*.jade -o .bin --no-debug --obj '{"basedir":"views"}'
27```
28
29## API
30
31The API is the same as the API in Jade, but it produces `require` statements instead of inlining `include` statements.
32
33# License
34
35MIT