mirror of
https://gitee.com/docsifyjs/docsify.git
synced 2024-11-30 02:58:37 +08:00
16 lines
372 B
JavaScript
16 lines
372 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)
|
|
}).catch(e => {
|
|
console.error(e)
|
|
process.exit(1)
|
|
})
|
|
})
|