On Github simme / node-meetup-rework
var rework = require('rework'); var plugin = require('plugin'); var plugin2 = require('plugin2'); var str = fs.readFileSync('mystylesheet.css', 'utf8'); var css = rework(str) .use(plugin()) .use(plugin()) .toString();
var css = rework(str)Pass AST to each plugin and let them modify the AST in turn
.use(plugin())Create string form AST — voila!
.toString();
Examples on GitHub