2019-10-14 13:44:40 +00:00
|
|
|
|
|
|
|
|
|
|
|
const fs = require('fs-extra');
|
|
|
|
|
2019-10-16 17:06:45 +00:00
|
|
|
const copyFiles = build_path => {
|
|
|
|
let dest_dir = `${build_path}/src`
|
|
|
|
fs.ensureDirSync(dest_dir)
|
2019-10-14 13:44:40 +00:00
|
|
|
|
2019-10-16 17:06:45 +00:00
|
|
|
for (let p of ["package.json", "src", "tsconfig.json", "yarn.lock", "public"]) {
|
|
|
|
fs.copy(p, `${dest_dir}/${p}`)
|
|
|
|
}
|
2019-10-14 13:44:40 +00:00
|
|
|
|
|
|
|
};
|
|
|
|
|
|
|
|
if (require.main === module) {
|
2019-10-16 17:06:45 +00:00
|
|
|
copyFiles("'./build'");
|
2019-10-14 13:44:40 +00:00
|
|
|
}
|
|
|
|
|