|
|
@ -56,15 +56,17 @@ function copyHtml () {
|
|
|
|
rl.on('line', (line) => {
|
|
|
|
rl.on('line', (line) => {
|
|
|
|
const name = line.split('antd/')[1].split('/')[0]
|
|
|
|
const name = line.split('antd/')[1].split('/')[0]
|
|
|
|
console.log('create path:', name)
|
|
|
|
console.log('create path:', name)
|
|
|
|
const toPath1 = `site-dist/components/${name}`
|
|
|
|
const toPaths = [
|
|
|
|
const toPath2 = `site-dist/components/${name}-cn`
|
|
|
|
`site-dist/components/${name}`,
|
|
|
|
rimraf.sync(path.join(cwd, toPath1))
|
|
|
|
`site-dist/components/${name}-cn`,
|
|
|
|
rimraf.sync(path.join(cwd, toPath2))
|
|
|
|
`site-dist/iframe/${name}`,
|
|
|
|
mkdirp(path.join(cwd, toPath1), function () {
|
|
|
|
`site-dist/iframe/${name}-cn`,
|
|
|
|
fs.writeFileSync(path.join(cwd, `${toPath1}/index.html`), fs.readFileSync(path.join(cwd, 'site-dist/index.html')))
|
|
|
|
]
|
|
|
|
})
|
|
|
|
toPaths.forEach(toPath => {
|
|
|
|
mkdirp(path.join(cwd, toPath2), function () {
|
|
|
|
rimraf.sync(path.join(cwd, toPath))
|
|
|
|
fs.writeFileSync(path.join(cwd, `${toPath2}/index.html`), fs.readFileSync(path.join(cwd, 'site-dist/index.html')))
|
|
|
|
mkdirp(path.join(cwd, toPath), function () {
|
|
|
|
|
|
|
|
fs.writeFileSync(path.join(cwd, `${toPath}/index.html`), fs.readFileSync(path.join(cwd, 'site-dist/index.html')))
|
|
|
|
|
|
|
|
})
|
|
|
|
})
|
|
|
|
})
|
|
|
|
})
|
|
|
|
})
|
|
|
|
const source = [
|
|
|
|
const source = [
|
|
|
|