@itayzrihan/create-box-app 1.0.5 → 1.1.0

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@itayzrihan/create-box-app",
3
- "version": "1.0.5",
3
+ "version": "1.1.0",
4
4
  "description": "Create a new BOX Framework application with one command",
5
5
  "main": "bin/create-box-app.js",
6
6
  "bin": {
@@ -38,6 +38,7 @@ Visit **http://localhost:3000** and start building!
38
38
  ```
39
39
  my-box-app/
40
40
  ├── my-box-app.code-workspace # ⬅️ OPEN THIS FILE in VS Code!
41
+ ├── box.config.json # Build configuration
41
42
  ├── src/
42
43
  │ ├── main.box # App entry point
43
44
  │ ├── counter.box # State management example
@@ -114,8 +115,51 @@ Files named `api+name.box` become routes:
114
115
  |---------|-------------|
115
116
  | `npm run dev` | Start development server with HMR |
116
117
  | `npm run build` | Build for production |
118
+ | `npm run build:analyze` | Build with detailed bundle analysis |
119
+ | `npm run build:prod` | Build with aggressive minification |
117
120
  | `npm run start` | Run production server |
118
121
  | `npm run preview` | Build and run production |
122
+ | `npm run clean` | Remove dist/ and build artifacts |
123
+ | `npm run lint` | Validate all .box files for errors |
124
+
125
+ ## 📦 CLI Commands
126
+
127
+ The BOX CLI offers powerful tools for development:
128
+
129
+ ```bash
130
+ # Generate new components
131
+ box add ui header # Create UI component
132
+ box add api users # Create API endpoint
133
+ box add page about # Create full page with SEO meta
134
+ box add layout main # Create layout wrapper
135
+
136
+ # Development
137
+ box dev # Start dev server with HMR
138
+ box build # Production build
139
+ box build --analyze # Show bundle analysis
140
+ box build --minify=none # Disable minification
141
+
142
+ # Maintenance
143
+ box clean # Remove build artifacts
144
+ box lint # Validate .box files
145
+ ```
146
+
147
+ ## ⚙️ Configuration
148
+
149
+ Your project includes `box.config.json` for customization:
150
+
151
+ ```json
152
+ {
153
+ "minify": "basic", // none | basic | aggressive
154
+ "outDir": "dist",
155
+ "srcDir": "src",
156
+ "port": 3000,
157
+ "build": {
158
+ "cleanFirst": false,
159
+ "analyze": false
160
+ }
161
+ }
162
+ ```
119
163
 
120
164
  ## 🔌 VS Code Setup
121
165
 
@@ -0,0 +1,14 @@
1
+ {
2
+ "//": "BOX Framework Configuration",
3
+ "//": "See: https://github.com/itayzrihan/box#configuration",
4
+
5
+ "minify": "basic",
6
+ "outDir": "dist",
7
+ "srcDir": "src",
8
+ "port": 3000,
9
+
10
+ "build": {
11
+ "cleanFirst": false,
12
+ "analyze": false
13
+ }
14
+ }
@@ -5,8 +5,12 @@
5
5
  "scripts": {
6
6
  "dev": "box dev",
7
7
  "build": "box build",
8
+ "build:analyze": "box build --analyze",
9
+ "build:prod": "box build --minify=aggressive",
8
10
  "start": "node dist/server.js",
9
- "preview": "npm run build && npm run start"
11
+ "preview": "npm run build && npm run start",
12
+ "clean": "box clean",
13
+ "lint": "box lint"
10
14
  },
11
15
  "keywords": [
12
16
  "box",
@@ -16,6 +20,6 @@
16
20
  "author": "",
17
21
  "license": "MIT",
18
22
  "dependencies": {
19
- "@itayzrihan/box-framework": "^1.0.0"
23
+ "@itayzrihan/box-framework": "^1.1.0"
20
24
  }
21
25
  }