create-jant 0.3.16 → 0.3.18

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 CHANGED
@@ -9,7 +9,7 @@ import path from "path";
9
9
  import { fileURLToPath } from "url";
10
10
  var __filename = fileURLToPath(import.meta.url);
11
11
  var __dirname = path.dirname(__filename);
12
- var CORE_VERSION = "0.3.16";
12
+ var CORE_VERSION = "0.3.18";
13
13
  var TEMPLATE_DIR = fs.existsSync(path.resolve(__dirname, "../template")) ? path.resolve(__dirname, "../template") : path.resolve(__dirname, "../../../templates/jant-site");
14
14
  function isValidProjectName(name) {
15
15
  return /^[a-z0-9]([a-z0-9-]*[a-z0-9])?$/.test(name);
@@ -122,7 +122,7 @@ async function copyTemplate(config) {
122
122
  for (const [key, value] of Object.entries(pkg.scripts)) {
123
123
  if (typeof value === "string") {
124
124
  pkg.scripts[key] = value.replace(
125
- /pnpm (\S+)/g,
125
+ /pnpm run (\S+)/g,
126
126
  (_, script) => formatRunCmd(packageManager, script)
127
127
  );
128
128
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "create-jant",
3
- "version": "0.3.16",
3
+ "version": "0.3.18",
4
4
  "description": "Create a new Jant project",
5
5
  "type": "module",
6
6
  "bin": {
@@ -2,25 +2,43 @@
2
2
 
3
3
  A personal website/blog powered by [Jant](https://github.com/jant-me/jant).
4
4
 
5
- **Want your own site?** Deploy to Cloudflare in one click:
5
+ ## Getting Started
6
+
7
+ ### Option A: One-Click Deploy
8
+
9
+ Deploy to Cloudflare instantly — no local setup required:
6
10
 
7
11
  [![Deploy to Cloudflare](https://deploy.workers.cloudflare.com/button)](https://deploy.workers.cloudflare.com/?url=https://github.com/jant-me/jant-starter)
8
12
 
9
- > Already deployed? Your site is live with automatic CI/CD. You can clone your repo and run `pnpm dev` to customize or [update](#updating) your site locally.
13
+ Your site will be live with automatic CI/CD. To develop locally:
10
14
 
11
- ## Getting Started
15
+ ```bash
16
+ # Clone the repo that was created for you
17
+ git clone git@github.com:<your-username>/<your-repo>.git
18
+ cd <your-repo>
19
+ npm install
20
+ npm run dev
21
+ ```
22
+
23
+ Visit http://localhost:9019. Changes pushed to `main` will auto-deploy.
24
+
25
+ > If you used this option, skip ahead to [Commands](#commands) — the deployment and CI/CD sections below don't apply to you.
26
+
27
+ ### Option B: Create with CLI
28
+
29
+ Set up a new project locally, then deploy manually:
12
30
 
13
31
  ```bash
14
- pnpm create jant my-site
32
+ npm create jant my-site
15
33
  cd my-site
16
- pnpm dev
34
+ npm run dev
17
35
  ```
18
36
 
19
- Visit http://localhost:9019 to see your site.
37
+ Visit http://localhost:9019. When you're ready to go live, continue with [Deploy to Cloudflare](#deploy-to-cloudflare) below.
20
38
 
21
39
  ## Deploy to Cloudflare
22
40
 
23
- Once you've run `pnpm create jant my-site`, follow these steps to deploy it.
41
+ > This section is for **CLI-created projects** (Option B). One-click deploy users already have this set up.
24
42
 
25
43
  ### 1. Prerequisites
26
44
 
@@ -63,13 +81,13 @@ wrangler secret put AUTH_SECRET
63
81
  # Paste the generated value when prompted
64
82
  ```
65
83
 
66
- > **Important:** This is separate from the `AUTH_SECRET` in `.dev.vars` (which is for local development only). Do not change the production secret after your site is live — it will invalidate all sessions. If you get locked out, use `pnpm reset-password` to generate a password reset link.
84
+ > **Important:** This is separate from the `AUTH_SECRET` in `.dev.vars` (which is for local development only). Do not change the production secret after your site is live — it will invalidate all sessions. If you get locked out, use `npm run reset-password` to generate a password reset link.
67
85
 
68
86
  ### 5. Deploy
69
87
 
70
88
  ```bash
71
89
  # Apply database migrations and deploy
72
- pnpm run deploy
90
+ npm run deploy
73
91
  ```
74
92
 
75
93
  Your site is now live at `https://<your-project>.<your-subdomain>.workers.dev`!
@@ -82,6 +100,8 @@ Your site is now live at `https://<your-project>.<your-subdomain>.workers.dev`!
82
100
 
83
101
  ## GitHub Actions (CI/CD)
84
102
 
103
+ > This section is for **CLI-created projects** (Option B). One-click deploy users already have CI/CD configured.
104
+
85
105
  A workflow file is included at `.github/workflows/deploy.yml`. Complete the [deployment](#deploy-to-cloudflare) first, then set up CI for automatic deployments.
86
106
 
87
107
  > Runtime secrets (`AUTH_SECRET`, S3 keys, etc.) are already stored in Cloudflare from the manual deployment step. CI only needs deployment credentials.
@@ -157,16 +177,14 @@ jobs:
157
177
 
158
178
  ## Commands
159
179
 
160
- | Command | Description |
161
- | ------------------------ | ---------------------------------- |
162
- | `pnpm dev` | Start development server |
163
- | `pnpm build` | Build for production |
164
- | `pnpm run deploy` | Migrate, build, and deploy |
165
- | `pnpm preview` | Preview production build |
166
- | `pnpm typecheck` | Run TypeScript checks |
167
- | `pnpm db:migrate:remote` | Apply database migrations (remote) |
168
-
169
- > `deploy` uses `pnpm run deploy` because `pnpm deploy` is a built-in pnpm command. All other scripts work with or without `run`.
180
+ | Command | Description |
181
+ | --------------------------- | ---------------------------------- |
182
+ | `npm run dev` | Start development server |
183
+ | `npm run build` | Build for production |
184
+ | `npm run deploy` | Migrate, build, and deploy |
185
+ | `npm run preview` | Preview production build |
186
+ | `npm run typecheck` | Run TypeScript checks |
187
+ | `npm run db:migrate:remote` | Apply database migrations (remote) |
170
188
 
171
189
  ## Environment Variables
172
190
 
@@ -229,7 +247,7 @@ Add custom CSS in `src/theme/styles/`:
229
247
  ### Using Third-Party Themes
230
248
 
231
249
  ```bash
232
- pnpm add @jant-themes/minimal
250
+ npm install @jant-themes/minimal
233
251
  ```
234
252
 
235
253
  ```typescript
@@ -245,13 +263,13 @@ export default createApp({
245
263
 
246
264
  ```bash
247
265
  # Update @jant/core to latest version
248
- pnpm add @jant/core@latest
266
+ npm install @jant/core@latest
249
267
 
250
268
  # Start dev server (auto-applies migrations locally)
251
- pnpm dev
269
+ npm run dev
252
270
 
253
271
  # Deploy (includes remote migrations)
254
- pnpm run deploy
272
+ npm run deploy
255
273
  ```
256
274
 
257
275
  > New versions of `@jant/core` may include database migrations. Check the [release notes](https://github.com/jant-me/jant/releases) for any breaking changes.