MCPcopy Create free account
hub / github.com/CreminiAI/skillpack / copyStartTemplates

Function copyStartTemplates

src/commands/create.ts:97–114  ·  view source on GitHub ↗

* Copy templates/start.sh and templates/start.bat to workDir.

(workDir: string)

Source from the content-addressed store, hash-verified

95 * Copy templates/start.sh and templates/start.bat to workDir.
96 */
97function copyStartTemplates(workDir: string): void {
98 const templateDir = path.resolve(
99 new URL("../templates", import.meta.url).pathname,
100 );
101
102 for (const file of ["start.sh", "start.bat"]) {
103 const src = path.join(templateDir, file);
104 const dest = path.join(workDir, file);
105 if (fs.existsSync(src)) {
106 fs.copyFileSync(src, dest);
107 if (file === "start.sh") {
108 fs.chmodSync(dest, 0o755);
109 }
110 } else {
111 console.warn(chalk.yellow(` [warn] Template not found: ${src}`));
112 }
113 }
114}
115
116// ---------------------------------------------------------------------------
117// create command

Callers 2

initFromConfigFunction · 0.70
interactiveCreateFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected