blob: 81953b9d5c23369611ad2413932776067f0cbd05 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
|
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
})
}
|