create-fsaa 0.2.1 → 0.2.3

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.
Files changed (3) hide show
  1. package/README.md +20 -0
  2. package/lib/init.mjs +12 -5
  3. package/package.json +1 -1
package/README.md CHANGED
@@ -4,6 +4,26 @@
4
4
 
5
5
  > **FSD + Atomic Design with the missing decision rules: *where does UI go?***
6
6
 
7
+ **⚠ This package is a scaffolding CLI, not a library.** `npm i create-fsaa` only installs it into an existing project's `node_modules` — and nothing happens. Run it instead:
8
+
9
+ ```text
10
+ # from an EMPTY folder — this creates a new FSAA project:
11
+ npm create fsaa@latest
12
+ # (equivalently: npx create-fsaa@latest)
13
+ ```
14
+
15
+ What `npm create fsaa` gives you: the full FSAA layer structure (`app/`, `pages/`, `features/`, `entities/`, `shared/`), `eslint.config.mjs` with **eslint-plugin-fsaa** boundary rules wired into CI, an `AGENTS.md` contract with drift-check, and `pnpm` scripts (`dev`, `lint`, `typecheck`, `build`).
16
+
17
+ Inside a created FSAA project, the same CLI generates canonical slices:
18
+
19
+ ```text
20
+ pnpm exec fsaa g feature billing
21
+ pnpm exec fsaa g entity invoice
22
+ pnpm exec fsaa g molecule DataTable
23
+ ```
24
+
25
+ ---
26
+
7
27
  [![templates](https://img.shields.io/badge/templates-fsaa--react%20·%20fsaa--vite-43e0bd)](https://aramex86.github.io/fsaa/)
8
28
  [![docs](https://img.shields.io/badge/docs-aramex86.github.io%2Ffsaa-7ab8ff)](https://aramex86.github.io/fsaa/)
9
29
  ![license](https://img.shields.io/badge/license-MIT-b79bff)
package/lib/init.mjs CHANGED
@@ -79,7 +79,7 @@ export async function initCmd({ flags, interactive }) {
79
79
  console.log(` pnpm not on PATH — running the pinned pnpm@${pinned} through npx…`);
80
80
  r = spawnSync(npxBin, ["-y", `pnpm@${pinned}`, "install"], { cwd: dest, stdio: "inherit", shell: win });
81
81
  if (r.error) {
82
- console.error(`\nfsaa: could not install dependencies automatically (npx unavailable).\n recover by hand: cd ${dest} && npm exec -y pnpm@${pinned} install`);
82
+ console.error(`\nfsaa: could not install dependencies automatically (npx unavailable).\n recover by hand: cd ${dest} && corepack enable && pnpm install\n (or: cd ${dest} && npm exec -y pnpm@${pinned} install)`);
83
83
  const e = new Error("install failed");
84
84
  e.userError = true;
85
85
  throw e;
@@ -106,12 +106,19 @@ export async function initCmd({ flags, interactive }) {
106
106
  gitInit(dest, "feat/init", nameSafe(dest));
107
107
 
108
108
  console.log(`\n${"=".repeat(52)}`);
109
- console.log(` ✔ ${name} is ready (${templateLabel(template)})`);
110
- console.log(` cd ${dest}`);
111
- console.log(` ${manager} run dev`);
109
+ console.log(` ✔ ${name} is ready (${templateLabel(template)}) — dependencies are installed`);
110
+ // Vite-style relative next command (Windows users can paste it as-is);
111
+ // the absolute path goes in parentheses for orientation.
112
+ console.log(` Now run:\n\n cd ${name}\n ${manager} run dev\n`);
113
+ console.log(` (project created at ${dest})`);
112
114
  console.log(` agent contract: AGENTS.md · skills: agents/`);
113
115
  console.log(` generate slices: ${manager === "pnpm" ? "pnpm exec" : "npx"} fsaa g <slice-name> (or: npx create-fsaa g <slice-name>)`);
114
- console.log("=".repeat(52));
116
+ console.log(`${"-".repeat(52)}`);
117
+ console.log(` no pnpm on PATH? enable the one bundled with Node (one-time, no global install):`);
118
+ console.log(` corepack enable`);
119
+ console.log(` or always prefix pnpm with the pinned version:`);
120
+ console.log(` npx -y ${pkg.packageManager || "pnpm@10.34.9"} <command>`);
121
+ console.log(`=`.repeat(52));
115
122
  return 0;
116
123
  }
117
124
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "create-fsaa",
3
- "version": "0.2.1",
3
+ "version": "0.2.3",
4
4
  "description": "FSAA \u2014 Feature-Sliced Atomic Architecture. Run `npm create fsaa` (this package) to scaffold an FSAA app from the official starter templates; `fsaa g <slice>` generates canonical slices.",
5
5
  "license": "MIT",
6
6
  "author": "Veaceslav Bezusco <Aramex86@users.noreply.github.com>",