sync.js 325 B

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