$ npm install broccoli-processor --save
var BroccoliProcessor = require('broccoli-processor');
var Broccoli = require('broccoli-html-editor');
var broccoli = new Broccoli();
broccoli.init(
{
/* Any options for broccoli-html-editor */
},
function(){
var broccoliProcessor = new BroccoliProcessor(broccoli);
broccoliProcessor
.each(function( editor ){
// APIs
// - editor.getBroccoli()
// - editor.getInstancePath()
// - editor.getInstance()
// - editor.setInstance(instance)
// - editor.log(val)
// - editor.done()
// and the libs supplied in,
// - editor.supply.cheerio
// - editor.supply.iterate79
console.log(editor);
editor.done();
})
.run(function(logs){
console.log('finished.');
})
;
}
);
var broccoliProcessor = new BroccoliProcessor(broccoli, {
"rebuild": function(callback){
// Write here a process rebuilding Broccoli contents.
callback(true);
}
});
editor.getBroccoli()
を追加。editor.supply.cheerio
を追加。editor.supply.iterate79
を追加。options.rebuild()
を追加。
- Initial release.
MIT License
- Tomoya Koyanagi tomk79@gmail.com
- website: http://www.pxt.jp/
- Twitter: @tomk79 http://twitter.com/tomk79/