UNPKG

442 BJavaScriptView Raw
1const cjstoes = require('cjstoes')
2const fse = require('fs-extra')
3const glob = require('glob')
4const { readFileSync, writeFileSync } = require('fs')
5
6module.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}