create-skybridge 0.0.0-dev.994cdf4 → 0.0.0-dev.99a0b96
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/dist/index.js +37 -1
- package/package.json +1 -1
- package/template/AGENTS.md +1 -0
- package/template/web/src/index.css +4 -1
package/dist/index.js
CHANGED
|
@@ -153,7 +153,29 @@ export async function init(args = process.argv.slice(2)) {
|
|
|
153
153
|
}
|
|
154
154
|
const userAgent = process.env.npm_config_user_agent;
|
|
155
155
|
const pkgManager = userAgent?.split(" ")[0]?.split("/")[0] || "npm";
|
|
156
|
-
// 4. Ask about
|
|
156
|
+
// 4. Ask about skills installation
|
|
157
|
+
if (interactive) {
|
|
158
|
+
const skillsResult = await prompts.confirm({
|
|
159
|
+
message: "Install the coding agents skills? (recommended)",
|
|
160
|
+
initialValue: true,
|
|
161
|
+
});
|
|
162
|
+
if (prompts.isCancel(skillsResult)) {
|
|
163
|
+
return cancel();
|
|
164
|
+
}
|
|
165
|
+
if (skillsResult) {
|
|
166
|
+
run([
|
|
167
|
+
...getPkgExecCmd(pkgManager, "skills"),
|
|
168
|
+
"add",
|
|
169
|
+
"alpic-ai/skybridge",
|
|
170
|
+
"-s",
|
|
171
|
+
"chatgpt-app-builder",
|
|
172
|
+
], {
|
|
173
|
+
stdio: "inherit",
|
|
174
|
+
cwd: targetDir,
|
|
175
|
+
});
|
|
176
|
+
}
|
|
177
|
+
}
|
|
178
|
+
// 5. Ask about immediate installation
|
|
157
179
|
let immediate = argImmediate;
|
|
158
180
|
if (immediate === undefined) {
|
|
159
181
|
if (interactive) {
|
|
@@ -240,3 +262,17 @@ function emptyDir(dir) {
|
|
|
240
262
|
fs.rmSync(path.resolve(dir, file), { recursive: true, force: true });
|
|
241
263
|
}
|
|
242
264
|
}
|
|
265
|
+
function getPkgExecCmd(pkgManager, cmd) {
|
|
266
|
+
switch (pkgManager) {
|
|
267
|
+
case "yarn":
|
|
268
|
+
return ["yarn", "dlx", cmd];
|
|
269
|
+
case "pnpm":
|
|
270
|
+
return ["pnpm", "dlx", cmd];
|
|
271
|
+
case "bun":
|
|
272
|
+
return ["bunx", cmd];
|
|
273
|
+
case "deno":
|
|
274
|
+
return ["deno", "run", "-A", `npm:${cmd}`];
|
|
275
|
+
default:
|
|
276
|
+
return ["npx", cmd];
|
|
277
|
+
}
|
|
278
|
+
}
|
package/package.json
CHANGED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
Before writing code, first explore the project structure, then invoke the chatgpt-app-builder skill for documentation.
|