A multi-rule multi-purpose source/target agnostic configurable transformer
This module and documentation is still considered work-in-progress. Only no config example is added below for a preview
Check produce-example-multihash. This is the current definitive example with concept outline.
Install required plugins and it will automatically use them to produce output/serve content
Example: https://github.com/aularon/produce-example-no-conf
Very similar to No Config, plus you can set per-plugin settings in package.json
Example: https://github.com/aularon/produce-example-micro-conf
less: less | add_header_note(preview) | yuicompressor(dist) > css
pug,jade: pug | add_header_note(preview) > html
js: babel | add_header_note(preview) | closure > js
{
rules: [
{
source: /\.(pug|jade)$/,
via: [
'pug',
{
processor: 'add_header_note',
modes: ['serve']
},
],
target: 'css'
}
]
}
- Source.read(input)
- Target.write(output)
proudce sourceDir targetDir # fs source and fs target
proudce sourceDir # fs source and http target