primo-cli 0.1.0 → 0.1.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
@@ -144,31 +144,17 @@ my-site/
144
144
  └── uploads/ # Media files
145
145
  ```
146
146
 
147
- ## Multi-Site Mode
147
+ ## Multiple Sites
148
148
 
149
- Manage multiple sites from one directory:
149
+ Run `primo dev` from a parent folder to work on multiple sites at once:
150
150
 
151
151
  ```
152
152
  workspace/
153
- ├── server.json
153
+ ├── server.json # Optional: { "port": 3000 }
154
154
  ├── site-one/
155
- ├── primo.json
156
- │ ├── blocks/
157
- │ └── pages/
155
+ └── primo.json
158
156
  └── site-two/
159
- ├── primo.json
160
- ├── blocks/
161
- └── pages/
162
- ```
163
-
164
- ```json
165
- // server.json
166
- { "port": 3000 }
167
- ```
168
-
169
- ```bash
170
- cd workspace
171
- primo dev
157
+ └── primo.json
172
158
  ```
173
159
 
174
160
  Each site gets its own subdomain: `site-one.localhost:3000`, `site-two.localhost:3000`
package/dist/index.js CHANGED
@@ -12,7 +12,7 @@ const program = new Command();
12
12
  program
13
13
  .name('primo')
14
14
  .description('Build sites visually, edit them anywhere')
15
- .version('0.1.0');
15
+ .version('0.1.2');
16
16
  program
17
17
  .command('new [name]')
18
18
  .description('Create a new site and start local CMS')
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "primo-cli",
3
- "version": "0.1.0",
3
+ "version": "0.1.2",
4
4
  "description": "Local development CLI for Primo",
5
5
  "type": "module",
6
6
  "bin": {
@@ -9,7 +9,8 @@
9
9
  "scripts": {
10
10
  "build": "tsc",
11
11
  "dev": "tsc --watch",
12
- "prepublishOnly": "npm run build"
12
+ "prepublishOnly": "npm run build",
13
+ "postinstall": "node scripts/postinstall.js"
13
14
  },
14
15
  "repository": {
15
16
  "type": "git",
@@ -45,7 +46,8 @@
45
46
  "typescript": "^5.3.3"
46
47
  },
47
48
  "files": [
48
- "dist"
49
+ "dist",
50
+ "scripts"
49
51
  ],
50
52
  "engines": {
51
53
  "node": ">=18.0.0"
@@ -0,0 +1,16 @@
1
+ #!/usr/bin/env node
2
+
3
+ const message = `
4
+ ┌─────────────────────────────────────────┐
5
+ │ │
6
+ │ Primo CLI installed successfully │
7
+ │ │
8
+ │ Get started: │
9
+ │ $ primo new my-site │
10
+ │ │
11
+ │ Docs: https://primocms.org/docs │
12
+ │ │
13
+ └─────────────────────────────────────────┘
14
+ `
15
+
16
+ console.log(message)