@itayzrihan/create-box-app 1.0.2 → 1.0.4

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.
@@ -33,6 +33,13 @@ async function init() {
33
33
  // Copy template directory recursively
34
34
  copyDir(templateDir, targetDir);
35
35
 
36
+ // Rename workspace file to project name
37
+ const oldWorkspacePath = path.join(targetDir, 'project.code-workspace');
38
+ const newWorkspacePath = path.join(targetDir, `${projectName}.code-workspace`);
39
+ if (fs.existsSync(oldWorkspacePath)) {
40
+ fs.renameSync(oldWorkspacePath, newWorkspacePath);
41
+ }
42
+
36
43
  // Customize package.json
37
44
  const pkgPath = path.join(targetDir, 'package.json');
38
45
  const pkg = JSON.parse(fs.readFileSync(pkgPath, 'utf-8'));
@@ -40,15 +47,21 @@ async function init() {
40
47
  fs.writeFileSync(pkgPath, JSON.stringify(pkg, null, 2));
41
48
 
42
49
  console.log(`✅ Project created successfully!\n`);
50
+
51
+ console.log(`╔══════════════════════════════════════════════════════════════╗`);
52
+ console.log(`║ 🎨 IMPORTANT: Open the WORKSPACE file for syntax highlighting`);
53
+ console.log(`╚══════════════════════════════════════════════════════════════╝\n`);
54
+
43
55
  console.log(`📋 Next steps:\n`);
44
- console.log(` 1. Navigate to your project:`);
45
- console.log(` cd ${projectName}\n`);
56
+ console.log(` 1. Open the workspace in VS Code (REQUIRED for .box highlighting):`);
57
+ console.log(` code ${projectName}/${projectName}.code-workspace\n`);
46
58
  console.log(` 2. Install dependencies:`);
59
+ console.log(` cd ${projectName}`);
47
60
  console.log(` npm install\n`);
48
61
  console.log(` 3. Start the dev server:`);
49
62
  console.log(` npm run dev\n`);
50
- console.log(` 4. Open in VS Code:`);
51
- console.log(` code .\n`);
63
+ console.log(` 4. Open http://localhost:3000\n`);
64
+ console.log(`💡 TIP: Always open the .code-workspace file, not the folder!\n`);
52
65
  console.log(`📚 Learn more: https://github.com/itayzrihan/box\n`);
53
66
  console.log(`Happy BOXing! 🚀\n`);
54
67
  } catch (error) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@itayzrihan/create-box-app",
3
- "version": "1.0.2",
3
+ "version": "1.0.4",
4
4
  "description": "Create a new BOX Framework application with one command",
5
5
  "main": "bin/create-box-app.js",
6
6
  "bin": {
@@ -7,6 +7,23 @@ Welcome to your BOX Framework application! This is a fully functional starter te
7
7
  - Use **component composition** with `<include />`
8
8
  - Develop with **instant hot-reload** (HMR)
9
9
 
10
+ ---
11
+
12
+ ## ⚠️ IMPORTANT: Open the Workspace File!
13
+
14
+ **For proper syntax highlighting in .box files, always open the `.code-workspace` file:**
15
+
16
+ ```bash
17
+ code my-box-app.code-workspace
18
+ ```
19
+
20
+ Or in VS Code: **File → Open Workspace from File → select `my-box-app.code-workspace`**
21
+
22
+ > 💡 **AI Assistants:** This project uses `.box` files which are HTML-like components.
23
+ > The workspace file configures VS Code to treat them as HTML with full syntax highlighting and Emmet support.
24
+
25
+ ---
26
+
10
27
  ## Quick Start
11
28
 
12
29
  ```bash
@@ -20,10 +37,7 @@ Visit **http://localhost:3000** and start building!
20
37
 
21
38
  ```
22
39
  my-box-app/
23
- ├── .vscode/
24
- │ ├── settings.json # IDE settings (.box → HTML highlighting)
25
- │ ├── extensions.json # Recommended VS Code extensions
26
- │ └── launch.json # Debug configurations
40
+ ├── my-box-app.code-workspace # ⬅️ OPEN THIS FILE in VS Code!
27
41
  ├── src/
28
42
  │ ├── main.box # App entry point
29
43
  │ ├── counter.box # State management example
@@ -0,0 +1,38 @@
1
+ {
2
+ "folders": [
3
+ {
4
+ "path": "."
5
+ }
6
+ ],
7
+ "settings": {
8
+ "files.associations": {
9
+ "*.box": "html"
10
+ },
11
+ "emmet.includeLanguages": {
12
+ "box": "html"
13
+ },
14
+ "editor.quickSuggestions": {
15
+ "strings": true
16
+ },
17
+ "editor.formatOnSave": true,
18
+ "editor.tabSize": 2,
19
+ "editor.wordWrap": "on",
20
+ "editor.bracketPairColorization.enabled": true,
21
+ "html.autoClosingTags": true,
22
+ "css.colorDecorators": true,
23
+ "files.exclude": {
24
+ "**/node_modules": true
25
+ },
26
+ "search.exclude": {
27
+ "**/node_modules": true,
28
+ "**/dist": true
29
+ }
30
+ },
31
+ "extensions": {
32
+ "recommendations": [
33
+ "formulahendry.auto-rename-tag",
34
+ "formulahendry.auto-close-tag",
35
+ "christian-kohler.path-intellisense"
36
+ ]
37
+ }
38
+ }
@@ -1,13 +0,0 @@
1
- {
2
- "recommendations": [
3
- "bradlc.vscode-tailwindcss",
4
- "formulahendry.auto-rename-tag",
5
- "formulahendry.auto-close-tag",
6
- "christian-kohler.path-intellisense",
7
- "pranaygp.vscode-css-peek",
8
- "zignd.html-css-class-completion",
9
- "ecmel.vscode-html-css",
10
- "ritwickdey.liveserver"
11
- ],
12
- "unwantedRecommendations": []
13
- }
@@ -1,25 +0,0 @@
1
- {
2
- "version": "0.2.0",
3
- "configurations": [
4
- {
5
- "name": "BOX Dev Server",
6
- "type": "node",
7
- "request": "launch",
8
- "runtimeExecutable": "npm",
9
- "runtimeArgs": ["run", "dev"],
10
- "cwd": "${workspaceFolder}",
11
- "console": "integratedTerminal",
12
- "skipFiles": ["<node_internals>/**"]
13
- },
14
- {
15
- "name": "BOX Production Server",
16
- "type": "node",
17
- "request": "launch",
18
- "program": "${workspaceFolder}/dist/server.js",
19
- "cwd": "${workspaceFolder}",
20
- "preLaunchTask": "npm: build",
21
- "console": "integratedTerminal",
22
- "skipFiles": ["<node_internals>/**"]
23
- }
24
- ]
25
- }
@@ -1,44 +0,0 @@
1
- {
2
- // Associate .box files with HTML for syntax highlighting
3
- "files.associations": {
4
- "*.box": "html"
5
- },
6
-
7
- // Enable Emmet in .box files for fast HTML typing
8
- "emmet.includeLanguages": {
9
- "box": "html"
10
- },
11
-
12
- // Enable autocomplete in strings (useful for box-bind attributes)
13
- "editor.quickSuggestions": {
14
- "strings": true
15
- },
16
-
17
- // Format on save for consistent code style
18
- "editor.formatOnSave": true,
19
-
20
- // Use 2 spaces for indentation (HTML/CSS/JS standard)
21
- "editor.tabSize": 2,
22
-
23
- // Wrap long lines for readability
24
- "editor.wordWrap": "on",
25
-
26
- // Show matching brackets clearly
27
- "editor.bracketPairColorization.enabled": true,
28
-
29
- // Auto-close HTML tags
30
- "html.autoClosingTags": true,
31
-
32
- // Show color decorators in CSS
33
- "css.colorDecorators": true,
34
-
35
- // Exclude build artifacts from explorer and search
36
- "files.exclude": {
37
- "**/node_modules": true,
38
- "**/dist": false
39
- },
40
- "search.exclude": {
41
- "**/node_modules": true,
42
- "**/dist": true
43
- }
44
- }