docsify/build/mincss.js

13 lines
313 B
JavaScript
Raw Normal View History

2018-03-03 23:19:46 +08:00
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)
})
})