create-fullstack-boilerplate 2.1.5 → 2.1.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/copyProject.js +6 -31
- package/package.json +1 -1
package/lib/copyProject.js
CHANGED
|
@@ -1,33 +1,8 @@
|
|
|
1
|
-
const { log } = require("./utils");
|
|
2
|
-
// const fs = require("fs-extra"); // remove this line
|
|
3
|
-
const cpy = require("cpy"); // add this
|
|
4
1
|
const path = require("path");
|
|
5
|
-
const fs = require("fs-extra");
|
|
2
|
+
const fs = require("fs-extra");
|
|
6
3
|
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
if (!await fs.pathExists(src)) {
|
|
13
|
-
throw new Error(`Template directory not found at: ${src}`);
|
|
14
|
-
}
|
|
15
|
-
|
|
16
|
-
log("Creating project directory...");
|
|
17
|
-
|
|
18
|
-
try {
|
|
19
|
-
// Use cpy instead of fs.copy
|
|
20
|
-
await cpy("**/*", dest, {
|
|
21
|
-
cwd: src,
|
|
22
|
-
parents: true,
|
|
23
|
-
filter: (srcPath) => !srcPath.includes("node_modules")
|
|
24
|
-
});
|
|
25
|
-
|
|
26
|
-
console.log("✅ Files copied successfully.");
|
|
27
|
-
} catch (err) {
|
|
28
|
-
try {
|
|
29
|
-
await fs.remove(dest);
|
|
30
|
-
} catch (_) { }
|
|
31
|
-
throw new Error(`Failed to copy project files: ${err.message}`);
|
|
32
|
-
}
|
|
33
|
-
};
|
|
4
|
+
await fs.copy(path.resolve(src), path.resolve(dest), {
|
|
5
|
+
overwrite: false,
|
|
6
|
+
errorOnExist: true,
|
|
7
|
+
filter: (srcPath) => !srcPath.includes("node_modules")
|
|
8
|
+
});
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "create-fullstack-boilerplate",
|
|
3
|
-
"version": "2.1.
|
|
3
|
+
"version": "2.1.6",
|
|
4
4
|
"description": "A Full Stack Application Comprised of React for Frontend, Express & Sequelize with Node js for Backend to help developers get started on real implementation instead of spending time setting up projects.",
|
|
5
5
|
"main": "index.js",
|
|
6
6
|
"bin": {
|