codeweaver 1.0.10 → 1.0.11
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/command.js +14 -12
- package/package.json +1 -1
package/command.js
CHANGED
|
@@ -1,15 +1,17 @@
|
|
|
1
|
-
#!/usr/bin/env node
|
|
1
|
+
#!/usr/bin/env node
|
|
2
2
|
|
|
3
|
-
const { exec } = require(
|
|
4
|
-
const path = require(
|
|
3
|
+
const { exec } = require("child_process");
|
|
4
|
+
const path = require("path");
|
|
5
5
|
|
|
6
|
-
const repoUrl =
|
|
7
|
-
const projectName = process.argv[2] ||
|
|
6
|
+
const repoUrl = "https://github.com/js-code-crafter/codeweaver.git";
|
|
7
|
+
const projectName = process.argv[2] || "codeweaver"; // Allow project name as an argument
|
|
8
8
|
|
|
9
|
-
exec(`git clone ${repoUrl} ${projectName}`, (error) => {
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
}
|
|
9
|
+
exec(`git clone ${repoUrl} ${projectName}`, (error) => {
|
|
10
|
+
if (error) {
|
|
11
|
+
console.error(`Error cloning repository: ${error.message}`);
|
|
12
|
+
return;
|
|
13
|
+
}
|
|
14
|
+
console.log(
|
|
15
|
+
`Successfully cloned codeweaver into ${path.resolve(projectName)}`
|
|
16
|
+
);
|
|
17
|
+
});
|