reworkcss / rework

Plugin framework for CSS preprocessing in Node.js

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Async plugins

paulmillr opened this issue · comments

Dupe of #2 but I got an actual API proposition

What about this

// sync
rework(css).use(plugin).toString()

// async; promise-based
rework(css)
  .then(function(object) {
    return plugin(object);
  })
  .then(function(object) {
    return object.toString();
  })

// or similar

@necolas

tired of dreadful performance of synchronous FS calls — this would really help in case of @imports etc

Just sticking your PR in here so people can follow along: #185