1 | const cjstoes = require('cjstoes')
|
2 | const fse = require('fs-extra')
|
3 | const glob = require('glob')
|
4 | const { readFileSync, writeFileSync } = require('fs')
|
5 |
|
6 | module.exports = () => {
|
7 | fse.copySync(`${process.cwd()}/pure/output`, `${process.cwd()}/.pureOutput`)
|
8 | glob.sync(`${process.cwd()}/.pureOutput/**/*.js`).forEach(file => {
|
9 | let f = readFileSync(file, 'utf8')
|
10 | let nf = cjstoes(f, file)
|
11 | writeFileSync(file, nf)
|
12 | })
|
13 | }
|