|
|
|
|
@ -33,7 +33,12 @@ async function copyFiles() {
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
async function copyDirs() {
|
|
|
|
|
const dirsToCopy = ["../common/images", "../client/libraries", "../server/db"];
|
|
|
|
|
const dirsToCopy = [
|
|
|
|
|
"../common/images",
|
|
|
|
|
"../client/src",
|
|
|
|
|
"../client/libraries",
|
|
|
|
|
"../server/src/views",
|
|
|
|
|
"../server/db"];
|
|
|
|
|
for (const dir of dirsToCopy) {
|
|
|
|
|
const destPath = path.join(DEST_DIR, trimRelativePath(dir));
|
|
|
|
|
console.log(`Copying ${dir} -> ${destPath}`);
|
|
|
|
|
@ -41,14 +46,6 @@ async function copyDirs() {
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
async function copyClient() {
|
|
|
|
|
const srcDirsToCopy = ["../client/src", "../server/src/views"];
|
|
|
|
|
for (const dir of srcDirsToCopy) {
|
|
|
|
|
console.log(`Copying ${dir}`);
|
|
|
|
|
await fs.copy(dir, path.join(DEST_DIR_SRC, trimRelativePath(dir)));
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
async function copyNodeModules() {
|
|
|
|
|
const nodeModulesFile = [
|
|
|
|
|
"../client/node_modules/react/umd/react.production.min.js",
|
|
|
|
|
@ -100,7 +97,6 @@ async function copyServerNodeModules() {
|
|
|
|
|
try {
|
|
|
|
|
copyFiles();
|
|
|
|
|
copyDirs();
|
|
|
|
|
copyClient();
|
|
|
|
|
copyNodeModules();
|
|
|
|
|
copyServerNodeModules();
|
|
|
|
|
console.log("Copying complete!");
|
|
|
|
|
|