docsify/build/mincss.js
2018-03-03 23:20:07 +08:00

13 lines
313 B
JavaScript

const cssnano = require('cssnano').process
const path = require('path')
const fs = require('fs')
files = fs.readdirSync(path.resolve('lib/themes'))
files.forEach(file => {
file = path.resolve('lib/themes', file)
cssnano(fs.readFileSync(file)).then(result => {
fs.writeFileSync(file, result.css)
})
})