create-three-blocks-starter 0.0.6 → 0.0.8

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 +39 -2
  2. package/bin/index.js +1043 -464
  3. package/package.json +1 -1
package/README.md CHANGED
@@ -7,9 +7,15 @@ Private CLI to scaffold a new project from the Three Blocks starter.
7
7
  Authenticate to the private registry first (one time per project):
8
8
 
9
9
  ```bash
10
- npx -y three-blocks-login --mode project --scope @three-blocks
10
+ # Using pnpm (recommended - no warnings)
11
+ pnpm dlx three-blocks-login@latest@latest --mode project --scope @three-blocks --channel stable
12
+
13
+ # Using npx (may show harmless npm config warnings)
14
+ npx -y three-blocks-login@latest --mode project --scope @three-blocks --channel stable
11
15
  ```
12
16
 
17
+ > **Note:** If you see npm warnings about unknown env configs, use `pnpm dlx` instead of `npx`, or see [three-blocks-login NPM warnings fix](https://www.npmjs.com/package/three-blocks-login).
18
+
13
19
  Then scaffold a new app:
14
20
 
15
21
  ```bash
@@ -26,6 +32,37 @@ pnpm i
26
32
  pnpm dev
27
33
  ```
28
34
 
35
+ ## CI/CD & Vercel Setup
36
+
37
+ The CLI now automatically generates the correct setup, but if you need to configure it manually:
38
+
39
+ ### Quick Setup (3 steps)
40
+
41
+ 1. **Commit `.npmrc`** to your repository (generated automatically by create-three-blocks-starter):
42
+ ```
43
+ @three-blocks:registry=https://three-blocks-196905988268.d.codeartifact.ap-northeast-1.amazonaws.com/npm/core/
44
+ ```
45
+
46
+ 2. **Preinstall script** (added automatically by create-three-blocks-starter):
47
+ ```json
48
+ {
49
+ "scripts": {
50
+ "preinstall": "npx -y three-blocks-login@latest"
51
+ }
52
+ }
53
+ ```
54
+
55
+ 3. **Set environment variable** in your CI/CD platform:
56
+ - **Vercel**: Project Settings → Environment Variables → Add `THREE_BLOCKS_SECRET_KEY`
57
+ - **GitHub Actions**: Repository Settings → Secrets → Add `THREE_BLOCKS_SECRET_KEY`
58
+ - **Other CI**: Add `THREE_BLOCKS_SECRET_KEY` secret with your license key
59
+
60
+ ### How It Works
61
+
62
+ - Committed `.npmrc` tells pnpm WHERE to find packages (no auth needed yet)
63
+ - Preinstall script fetches a short-lived token and adds it to `.npmrc`
64
+ - This solves pnpm's timing issue (it resolves packages before running preinstall)
65
+
29
66
  ## Development (monorepo)
30
67
 
31
68
  - The CLI pulls the template from `packages/three-blocks-starter/` during `prepack`.
@@ -38,6 +75,6 @@ pnpm --filter create-three-blocks-starter run dev:sync
38
75
  ## Publish
39
76
 
40
77
  ```bash
41
- npx -y three-blocks-login --mode project --scope @three-blocks
78
+ pnpm dlx three-blocks-login@latest --mode project --scope @three-blocks
42
79
  pnpm --filter create-three-blocks-starter publish --access restricted
43
80
  ```