mirror of
https://gitee.com/docsifyjs/docsify.git
synced 2024-12-02 20:20:30 +08:00
13 lines
313 B
JavaScript
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)
|
||
|
})
|
||
|
})
|