@imksh/create 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/package.json
CHANGED
|
@@ -15,8 +15,8 @@ export async function copyTemplate(templateName, targetDir, projectName) {
|
|
|
15
15
|
// Copy template files
|
|
16
16
|
await fs.copy(templateDir, targetDir, {
|
|
17
17
|
filter: (src) => {
|
|
18
|
-
|
|
19
|
-
return !
|
|
18
|
+
const relativePath = path.relative(templateDir, src);
|
|
19
|
+
return !relativePath.split(path.sep).includes('node_modules');
|
|
20
20
|
}
|
|
21
21
|
});
|
|
22
22
|
|
|
@@ -12,18 +12,12 @@ export async function installPackages(targetDir) {
|
|
|
12
12
|
packageManager = "yarn";
|
|
13
13
|
}
|
|
14
14
|
|
|
15
|
-
console.log(`[DEBUG] targetDir: ${targetDir}`);
|
|
16
|
-
console.log(`[DEBUG] targetDir exists: ${fs.existsSync(targetDir)}`);
|
|
17
|
-
if (fs.existsSync(targetDir)) {
|
|
18
|
-
console.log(`[DEBUG] targetDir contents:`, fs.readdirSync(targetDir));
|
|
19
|
-
}
|
|
20
|
-
|
|
21
15
|
try {
|
|
22
16
|
execSync(`${packageManager} install`, {
|
|
23
17
|
cwd: targetDir,
|
|
24
18
|
stdio: "inherit"
|
|
25
19
|
});
|
|
26
20
|
} catch (err) {
|
|
27
|
-
throw new Error(`Failed to run ${packageManager} install
|
|
21
|
+
throw new Error(`Failed to run ${packageManager} install`);
|
|
28
22
|
}
|
|
29
23
|
}
|
package/src/utils/runGit.js
CHANGED
|
@@ -6,7 +6,7 @@ export async function runGit(targetDir) {
|
|
|
6
6
|
execSync("git add .", { cwd: targetDir, stdio: "ignore" });
|
|
7
7
|
execSync("git commit -m \"Initial commit from @imksh/cli\"", { cwd: targetDir, stdio: "ignore" });
|
|
8
8
|
} catch (err) {
|
|
9
|
-
throw new Error(
|
|
9
|
+
throw new Error("Git initialization failed");
|
|
10
10
|
}
|
|
11
11
|
}
|
|
12
12
|
|