Broccoli plugin for precompiling Mithril msx views into js
npm install --save-dev broccoli-msx
var msx = require('broccoli-msx')
, pickFiles = require('broccoli-static-compiler')
, mergeTrees = require('broccoli-merge-trees')
;
var js = pickFiles('src/js', {
srcDir: '/',
destDir: 'js'
})
js = msx(js, {precompiled: false})
module.exports = mergeTrees([js])
.msx
files are automatically renamed to .js
options
- options accepted by
msx.transform()
.
{ harmony: true|false }
- enables/disables ES6 transforms supported by JSX Transformer. Default: false
{ precompile: true|false }
- enables/disable default precompilation and always output m() calls. Default: true