You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
$ npm install mnmly/builder-myth
# or
$ npm install builder-myth
API
myth(options)
Currently options can take only whitespace boolean.
It takes same option that can be passed to as rework's toString(opts).
On top of it, you can also pass whitespace, if you want to use significant whitespace.
Usage
varBuilder=require('component-builder2');varResolver=require('component-resolver');varco=require('co');varmyth=require('builder-myth');co(function*build(){varresolver=newResolver(process.cwd(),{install: true});// resolve the dependency treevartree=yield*resolver.tree();// lists the components in the proper build ordervarnodes=resolver.flatten(tree);// only include `.js` files from components' `.scripts` fieldvarscript=newBuilder.scripts(nodes);script.use('scripts',Builder.plugins.js());// only include `.css` files from components' `.styles` fieldvarstyle=newBuilder.styles(nodes);style.use('styles',Builder.plugins.css());style.use('styles',myth());// Or with whitespace option// style.use('styles', myth({whitespace: true, compress: true, sourcemap: true}));// write the builds to the following files in parallelyield[script.toFile('build.js'),style.toFile('build.css')];})();