create-muten 0.0.1 → 0.0.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/README.md CHANGED
@@ -1,14 +1,123 @@
1
1
  # create-muten
2
2
 
3
- Scaffold a new [Muten](https://www.npmjs.com/package/muten) app.
3
+ The official scaffolder for **[Muten](https://www.npmjs.com/package/@muten/core)** — an AI-first
4
+ frontend framework. One command bootstraps a complete, ready-to-run Muten app, so you never copy
5
+ boilerplate by hand.
4
6
 
5
7
  ```sh
6
- npm create muten@latest # or: npx create-muten
8
+ npm create muten@latest
7
9
  ```
8
10
 
9
- It prompts for the **project name**, the **stylesheet** (CSS/SCSS) and the **package manager**
10
- (default = the one you invoked it with), then scaffolds and — unless you decline — runs
11
- `<pm> install` + `<pm> run dev`. CI flags: `--css|--scss`, `--pm <npm|pnpm|yarn|bun>`, `--no-install`.
11
+ ## Why this exists
12
12
 
13
- The engine (`@muten/core`) is a separate package the app installs as a dependency — the same split as
14
- `create-vue` ↔ `vue`. It's a Node CLI (not a shell script), so it behaves the same on Windows and macOS.
13
+ Muten ships as **two** packages — the same split as `vue` ↔ `create-vue`:
14
+
15
+ - **[`@muten/core`](https://www.npmjs.com/package/@muten/core)** — the engine (compiler + runtime +
16
+ Vite plugin). Your app installs it as a normal dependency and it stays up to date on its own.
17
+ - **`create-muten`** (this package) — a tiny, **zero-dependency** CLI whose only job is to generate a
18
+ new project already wired to the engine: `index.html`, the Vite config, a `theme.muten`, a first
19
+ page and the right `package.json`.
20
+
21
+ You run `create-muten` **once** to scaffold; after that you just work inside your project.
22
+
23
+ ## Quick start
24
+
25
+ Every package manager has a `create` shortcut. `create-muten` detects which one you used and makes it
26
+ the default for the rest of the prompts:
27
+
28
+ ```sh
29
+ npm create muten@latest # npm
30
+ pnpm create muten # pnpm
31
+ yarn create muten # yarn
32
+ bun create muten # bun
33
+ ```
34
+
35
+ Prefer no install step? Run it on demand with **npx**, optionally naming the folder:
36
+
37
+ ```sh
38
+ npx create-muten my-app
39
+ ```
40
+
41
+ Or install it **globally** and reuse the command anywhere:
42
+
43
+ ```sh
44
+ npm i -g create-muten
45
+ create-muten my-app
46
+ ```
47
+
48
+ Then start the app:
49
+
50
+ ```sh
51
+ cd my-app
52
+ npm install # only if you skipped the auto-install
53
+ npm run dev
54
+ ```
55
+
56
+ ## What it asks
57
+
58
+ In an interactive terminal it prompts for a few things (defaults in parentheses):
59
+
60
+ | Prompt | Options | Default |
61
+ |---|---|---|
62
+ | **Project name** | any valid folder name | `muten-app` |
63
+ | **Stylesheet** | `css` / `scss` | `css` |
64
+ | **Package manager** | `npm` / `pnpm` / `yarn` / `bun` | the one that launched it |
65
+ | **Install deps and start dev now?** | `Y` / `n` | `Y` |
66
+
67
+ If you accept the last prompt it runs `<pm> install` followed by `<pm> run dev` — your app is live in a
68
+ single step. Choosing SCSS also adds `sass` and switches the stylesheet to `.scss` automatically.
69
+
70
+ ## Non-interactive (CI / scripts)
71
+
72
+ Pass the answers as arguments and it skips every prompt (this is also what runs when there is no TTY,
73
+ e.g. in CI):
74
+
75
+ ```sh
76
+ create-muten my-app --scss --pm pnpm # full control
77
+ create-muten my-app --css --no-install # just scaffold, decide later
78
+ ```
79
+
80
+ | Flag | Effect |
81
+ |---|---|
82
+ | `<name>` | the project folder (positional argument) |
83
+ | `--css` / `--scss` | pick the stylesheet (default: `css`) |
84
+ | `--pm <npm\|pnpm\|yarn\|bun>` | package manager to use (default: detected) |
85
+ | `--no-install` | scaffold only — don't install or start the dev server |
86
+ | `--help` | print usage and exit |
87
+ | `--version` | print the version and exit |
88
+
89
+ ## What you get
90
+
91
+ A minimal, conventional Muten app:
92
+
93
+ ```
94
+ my-app/
95
+ ├─ index.html # entry — loads /src/app.muten through the Vite plugin
96
+ ├─ vite.config.mjs # the @muten/core Vite plugin (dev server, HMR, routing)
97
+ ├─ theme.muten # your design tokens: spacing, fonts, weights, breakpoints
98
+ ├─ package.json # depends on @muten/core + vite
99
+ └─ src/
100
+ ├─ app.muten # the ROOT: routes (+ an optional persistent shell)
101
+ ├─ styles.css # your look (.scss if you chose SCSS)
102
+ └─ pages/
103
+ └─ home/home.muten # a page — the folder name is its route
104
+ ```
105
+
106
+ There is **no hand-written `main.js`**: the Vite plugin compiles `src/app.muten` into the app's entry,
107
+ so the whole app is `.muten` from the first line.
108
+
109
+ ## Requirements
110
+
111
+ - **Node.js 18+**
112
+ - One of: **npm**, **pnpm**, **yarn**, **bun**
113
+
114
+ ## Cross-platform
115
+
116
+ `create-muten` is a Node CLI (not a shell script), so the **exact same command** works on **Windows,
117
+ macOS and Linux** — npm generates the right launcher on each OS.
118
+
119
+ ## Links
120
+
121
+ - Engine — [`@muten/core`](https://www.npmjs.com/package/@muten/core)
122
+ - Source — [github.com/karttofer/create-muten](https://github.com/karttofer/create-muten)
123
+ - License — MIT
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "create-muten",
3
- "version": "0.0.1",
3
+ "version": "0.0.2",
4
4
  "description": "Scaffold a new Muten app.",
5
5
  "repository": {
6
6
  "type": "git",
@@ -8,7 +8,7 @@
8
8
  "lint": "muten lint"
9
9
  },
10
10
  "dependencies": {
11
- "@muten/core": "^0.0.1",
11
+ "@muten/core": "^0.0.2",
12
12
  "vite": "^8.0.16"
13
13
  }
14
14
  }