async.js 358 B

123456789101112131415
  1. let postcss = require('postcss')
  2. let processResult = require('./process-result')
  3. let parse = require('./parser')
  4. module.exports = function async(plugins) {
  5. let processor = postcss(plugins)
  6. return async input => {
  7. let result = await processor.process(input, {
  8. parser: parse,
  9. from: undefined
  10. })
  11. return processResult(result)
  12. }
  13. }