blob: 81953b9d5c23369611ad2413932776067f0cbd05 [file] [log] [blame]
const next = require('postcss-cssnext');
const modules = require('postcss-modules');
const postcss = require('postcss');
const processCss = function(file, done) {
postcss([
next,
modules({
getJSON: function(filename, json) {
file.rename(file.path + '.json')
done(JSON.stringify(json))
}
})
]).process(file.content, {
from: file.path,
to: file.path
}).catch(function(err) {
throw err
})
}