ship-create 1.6.0 → 1.6.2

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/create.mjs CHANGED
@@ -66,8 +66,8 @@ const I18N = {
66
66
  qProblem: "What is the #1 problem they face today?",
67
67
  qValue: "What makes them say 'I need this'? (the aha moment)",
68
68
  scaffolding: (slug) => `Scaffolding ./${slug} ...`,
69
- installing: "Installing packages (this takes ~30 seconds)...",
70
- installFail: (slug) => `npm install failed. Run it manually:\n cd ${slug} && npm install`,
69
+ installing: (pm) => `Installing packages with ${pm} ...`,
70
+ installFail: (slug, pm) => `${pm} install failed. Run it manually:\n cd ${slug} && ${pm} install`,
71
71
  folderExists: (slug) => `Folder ./${slug} already exists — pick a different name and run again.`,
72
72
  templatesMissing:"Bundled templates missing. Try: npx ship-create@latest",
73
73
  done: (slug) => `
@@ -97,8 +97,8 @@ const I18N = {
97
97
  qProblem: "ปัญหาอันดับ 1 ที่พวกเขาเจออยู่ทุกวันคืออะไร?",
98
98
  qValue: "อะไรทำให้พวกเขาบอกว่า 'ฉันต้องการสิ่งนี้!'? (จุด aha moment)",
99
99
  scaffolding: (slug) => `กำลัง scaffold ./${slug} ...`,
100
- installing: "กำลังติดตั้ง packages (ใช้เวลาประมาณ 30 วินาที)...",
101
- installFail: (slug) => `npm install ล้มเหลว รันเองได้ที่:\n cd ${slug} && npm install`,
100
+ installing: (pm) => `กำลังติดตั้ง packages ด้วย ${pm} ...`,
101
+ installFail: (slug, pm) => `${pm} install ล้มเหลว รันเองได้ที่:\n cd ${slug} && ${pm} install`,
102
102
  folderExists: (slug) => `โฟลเดอร์ ./${slug} มีอยู่แล้ว — เลือกชื่ออื่นแล้วรันใหม่`,
103
103
  templatesMissing:"ไม่พบ template ที่ bundle ไว้ ลองรัน: npx ship-create@latest",
104
104
  done: (slug) => `
@@ -284,6 +284,11 @@ function copyRecursiveExcluding(src, dest, excludeNames) {
284
284
  }
285
285
  }
286
286
 
287
+ function detectPackageManager() {
288
+ const result = spawnSync("pnpm", ["--version"], { shell: true, encoding: "utf8" });
289
+ return result.status === 0 ? "pnpm" : "npm";
290
+ }
291
+
287
292
  function toKebabCase(str) {
288
293
  return str
289
294
  .trim()
@@ -599,15 +604,16 @@ async function main() {
599
604
  if (fs.existsSync(src)) fs.copyFileSync(src, path.join(docsDir, f));
600
605
  }
601
606
 
602
- // ── npm install ────────────────────────────────────────────────────────────
603
- console.log(` ${C.dim}${t.installing}${C.reset}\n`);
604
- const install = spawnSync("npm", ["install"], {
607
+ // ── install ────────────────────────────────────────────────────────────────
608
+ const pm = detectPackageManager();
609
+ console.log(` ${C.dim}${t.installing(pm)}${C.reset}\n`);
610
+ const install = spawnSync(pm, ["install"], {
605
611
  cwd: outDir,
606
612
  stdio: "inherit",
607
613
  shell: true,
608
614
  });
609
615
  if (install.status !== 0) {
610
- console.log(`\n ${t.installFail(projectSlug)}`);
616
+ console.log(`\n ${t.installFail(projectSlug, pm)}`);
611
617
  }
612
618
 
613
619
  // ── Done ───────────────────────────────────────────────────────────────────
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "ship-create",
3
- "version": "1.6.0",
3
+ "version": "1.6.2",
4
4
  "description": "Scaffold a new project the SHIP Method way — Structure, Human Flow, Instruction, Publish. No git clone, no API key, just one command.",
5
5
  "type": "module",
6
6
  "license": "MIT",
@@ -14,7 +14,7 @@ S — STRUCTURE → H — HUMAN FLOW → I — INSTRUCTION → P — PUBLI
14
14
  **Do not create a task list. Do not plan. Act.**
15
15
 
16
16
  ### 1. Read (no output, no tasks)
17
- Silently read `docs/PROJECT.md` and `docs/HUMAN_FLOW.md`. If core sections are empty, ask the user one question: *"Describe your idea in one sentence."* Fill the docs from their answer, then continue.
17
+ Silently read `docs/PROJECT.md` and `docs/HUMAN_FLOW.md`. Check **Section 9 Technical Decisions** for `UI language` — if Thai (ภาษาไทย), switch to Thai for all output from this point forward. If core sections are empty, ask the user one question (in the correct language): *"Describe your idea in one sentence."* Fill the docs from their answer, then continue.
18
18
 
19
19
  ### 2. Theme — first visible output
20
20
  Present 2–3 theme options (palette name + font, one line each). Wait for the user to pick. Apply the chosen theme to `app/globals.css` and `app/layout.tsx`. Record in `docs/DESIGN_SYSTEM.md`. **This is the first thing the user sees — it must happen before any feature code.**
@@ -61,10 +61,11 @@ All docs live under `docs/`:
61
61
 
62
62
  ## Quick Orientation for a New Agent Session
63
63
 
64
- 1. Read `docs/PROJECT.md` to learn what's being built and for whom.
65
- 2. Read `docs/HUMAN_FLOW.md` to understand the user experience.
66
- 3. Check if `docs/AI_BUILD_SPEC.md` exists if yes, read it for the technical contract.
67
- 4. Then proceed with what the user asked, applying the rules above.
64
+ 1. Read `docs/PROJECT.md` learn what's being built and for whom.
65
+ 2. Check **Section 9 Technical Decisions** in `PROJECT.md` for `UI language`. If it says Thai (ภาษาไทย), switch to Thai immediately and use Thai for all responses, questions, and output for the rest of this session. If English, stay in English.
66
+ 3. Read `docs/HUMAN_FLOW.md` to understand the user experience.
67
+ 4. Check if `docs/AI_BUILD_SPEC.md` exists if yes, read it for the technical contract.
68
+ 5. Then proceed with what the user asked, applying the rules above.
68
69
 
69
70
  **Shortcut commands available:**
70
71
  - `/ship` — interactive gate-by-gate guide through Structure → Human Flow → Instruction → Publish
@@ -61,10 +61,11 @@ All docs live under `docs/`:
61
61
 
62
62
  ## Quick Orientation for a New Agent Session
63
63
 
64
- 1. Read `docs/PROJECT.md` to learn what's being built and for whom.
65
- 2. Read `docs/HUMAN_FLOW.md` to understand the user experience.
66
- 3. Check if `docs/AI_BUILD_SPEC.md` exists if yes, read it for the technical contract.
67
- 4. Then proceed with what the user asked, applying the rules above.
64
+ 1. Read `docs/PROJECT.md` learn what's being built and for whom.
65
+ 2. Check **Section 9 Technical Decisions** in `PROJECT.md` for `UI language`. If it says Thai (ภาษาไทย), switch to Thai immediately and use Thai for all responses, questions, and output for the rest of this session. If English, stay in English.
66
+ 3. Read `docs/HUMAN_FLOW.md` to understand the user experience.
67
+ 4. Check if `docs/AI_BUILD_SPEC.md` exists if yes, read it for the technical contract.
68
+ 5. Then proceed with what the user asked, applying the rules above.
68
69
 
69
70
  **Shortcut commands available:**
70
71
  - `/ship` — interactive gate-by-gate guide through Structure → Human Flow → Instruction → Publish
@@ -61,10 +61,11 @@ All docs live under `docs/`:
61
61
 
62
62
  ## Quick Orientation for a New Agent Session
63
63
 
64
- 1. Read `docs/PROJECT.md` to learn what's being built and for whom.
65
- 2. Read `docs/HUMAN_FLOW.md` to understand the user experience.
66
- 3. Check if `docs/AI_BUILD_SPEC.md` exists if yes, read it for the technical contract.
67
- 4. Then proceed with what the user asked, applying the rules above.
64
+ 1. Read `docs/PROJECT.md` learn what's being built and for whom.
65
+ 2. Check **Section 9 Technical Decisions** in `PROJECT.md` for `UI language`. If it says Thai (ภาษาไทย), switch to Thai immediately and use Thai for all responses, questions, and output for the rest of this session. If English, stay in English.
66
+ 3. Read `docs/HUMAN_FLOW.md` to understand the user experience.
67
+ 4. Check if `docs/AI_BUILD_SPEC.md` exists if yes, read it for the technical contract.
68
+ 5. Then proceed with what the user asked, applying the rules above.
68
69
 
69
70
  **Shortcut commands available:**
70
71
  - `/ship` — interactive gate-by-gate guide through Structure → Human Flow → Instruction → Publish
@@ -61,10 +61,11 @@ All docs live under `docs/`:
61
61
 
62
62
  ## Quick Orientation for a New Agent Session
63
63
 
64
- 1. Read `docs/PROJECT.md` to learn what's being built and for whom.
65
- 2. Read `docs/HUMAN_FLOW.md` to understand the user experience.
66
- 3. Check if `docs/AI_BUILD_SPEC.md` exists if yes, read it for the technical contract.
67
- 4. Then proceed with what the user asked, applying the rules above.
64
+ 1. Read `docs/PROJECT.md` learn what's being built and for whom.
65
+ 2. Check **Section 9 Technical Decisions** in `PROJECT.md` for `UI language`. If it says Thai (ภาษาไทย), switch to Thai immediately and use Thai for all responses, questions, and output for the rest of this session. If English, stay in English.
66
+ 3. Read `docs/HUMAN_FLOW.md` to understand the user experience.
67
+ 4. Check if `docs/AI_BUILD_SPEC.md` exists if yes, read it for the technical contract.
68
+ 5. Then proceed with what the user asked, applying the rules above.
68
69
 
69
70
  **Shortcut commands available:**
70
71
  - `/ship` — interactive gate-by-gate guide through Structure → Human Flow → Instruction → Publish