pni 1.0.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.
Files changed (50) hide show
  1. package/dist/add-three-app.d.ts +6 -0
  2. package/dist/add-three-app.js +111 -0
  3. package/dist/app.d.ts +11 -0
  4. package/dist/app.js +143 -0
  5. package/dist/cli.d.ts +2 -0
  6. package/dist/cli.js +71 -0
  7. package/dist/components/FeatureSelector.d.ts +21 -0
  8. package/dist/components/FeatureSelector.js +175 -0
  9. package/dist/components/ProgressIndicator.d.ts +7 -0
  10. package/dist/components/ProgressIndicator.js +46 -0
  11. package/dist/components/Summary.d.ts +8 -0
  12. package/dist/components/Summary.js +51 -0
  13. package/dist/components/WelcomeHeader.d.ts +2 -0
  14. package/dist/components/WelcomeHeader.js +8 -0
  15. package/dist/template_code/three/README.md +146 -0
  16. package/dist/template_code/three/World.js +133 -0
  17. package/dist/template_code/three/camera.js +30 -0
  18. package/dist/template_code/three/components/GlobeSphere.js +608 -0
  19. package/dist/template_code/three/components/cube.js +27 -0
  20. package/dist/template_code/three/components/lights.js +16 -0
  21. package/dist/template_code/three/components/sphere.js +26 -0
  22. package/dist/template_code/three/components/torus.js +25 -0
  23. package/dist/template_code/three/scene.js +28 -0
  24. package/dist/template_code/three/systems/Loop.js +43 -0
  25. package/dist/template_code/three/systems/Resizer.js +26 -0
  26. package/dist/template_code/three/systems/controls.js +19 -0
  27. package/dist/template_code/three/systems/post-processing.js +50 -0
  28. package/dist/template_code/three/systems/renderer.js +17 -0
  29. package/dist/template_code/three/utils/deviceDetector.js +141 -0
  30. package/dist/template_code/three/utils/gltfLoader.js +14 -0
  31. package/dist/template_code/three/utils/loadKTX2Texture.js +42 -0
  32. package/dist/template_code/three/utils/textureLoader.js +21 -0
  33. package/dist/utils/add-three.d.ts +7 -0
  34. package/dist/utils/add-three.js +288 -0
  35. package/dist/utils/app-creation.d.ts +4 -0
  36. package/dist/utils/app-creation.js +35 -0
  37. package/dist/utils/config-generator.d.ts +6 -0
  38. package/dist/utils/config-generator.js +508 -0
  39. package/dist/utils/css-variables.d.ts +4 -0
  40. package/dist/utils/css-variables.js +316 -0
  41. package/dist/utils/dependencies.d.ts +11 -0
  42. package/dist/utils/dependencies.js +68 -0
  43. package/dist/utils/package-manager.d.ts +4 -0
  44. package/dist/utils/package-manager.js +56 -0
  45. package/dist/utils/project-detection.d.ts +2 -0
  46. package/dist/utils/project-detection.js +60 -0
  47. package/dist/utils/shadcn-setup.d.ts +2 -0
  48. package/dist/utils/shadcn-setup.js +46 -0
  49. package/package.json +81 -0
  50. package/readme.md +119 -0
package/readme.md ADDED
@@ -0,0 +1,119 @@
1
+ # pni
2
+
3
+ CLI tool for creating Nuxt/Vue projects with Three.js and CSS variables setup.
4
+
5
+ ## Install
6
+
7
+ ```bash
8
+ npm install -g pni
9
+ ```
10
+
11
+ Or use with npx:
12
+
13
+ ```bash
14
+ npx pni
15
+ ```
16
+
17
+ ## Usage
18
+
19
+ ### Interactive Setup
20
+
21
+ Run the CLI without any flags for an interactive setup:
22
+
23
+ ```bash
24
+ pni
25
+ ```
26
+
27
+ ### Non-Interactive Setup
28
+
29
+ Use flags to skip prompts:
30
+
31
+ ```bash
32
+ pni --nuxt --threejs --css-vars
33
+ ```
34
+
35
+ ### Add Three.js to Existing Project
36
+
37
+ Add Three.js template code to an existing project:
38
+
39
+ ```bash
40
+ pni add three
41
+ ```
42
+
43
+ ## Options
44
+
45
+ - `--nuxt` - Force Nuxt project type
46
+ - `--vue` - Force Vue project type
47
+ - `--threejs` - Include Three.js setup
48
+ - `--css-vars` - Include CSS variables (shadcn-style) setup
49
+ - `--dir <path>` - Target directory (default: current directory)
50
+ - `--non-interactive` - Skip prompts, use flags only
51
+
52
+ ## Examples
53
+
54
+ ### Create Nuxt app with Three.js and CSS variables
55
+
56
+ ```bash
57
+ pni --nuxt --threejs --css-vars
58
+ ```
59
+
60
+ ### Create Vue app with Three.js
61
+
62
+ ```bash
63
+ pni --vue --threejs
64
+ ```
65
+
66
+ ### Add CSS variables to existing project
67
+
68
+ ```bash
69
+ pni --css-vars
70
+ ```
71
+
72
+ ### Add Three.js template to existing project
73
+
74
+ ```bash
75
+ pni add three
76
+ ```
77
+
78
+ ## Features
79
+
80
+ - **Project Detection**: Automatically detects existing Nuxt/Vue projects
81
+ - **Three.js Setup**: Custom Three.js template code (no tresjs dependencies)
82
+ - **CSS Variables**: Shadcn-style CSS variables with Tailwind CSS
83
+ - **Package Manager Detection**: Automatically detects and uses npm, pnpm, or yarn
84
+ - **Interactive CLI**: Beautiful terminal UI with progress indicators
85
+
86
+ ## Development
87
+
88
+ ### Using React DevTools
89
+
90
+ This project uses Ink for the CLI interface, which supports React DevTools for debugging.
91
+
92
+ To use React DevTools:
93
+
94
+ 1. **Start React DevTools** in a separate terminal:
95
+ ```bash
96
+ npx react-devtools
97
+ ```
98
+
99
+ 2. **Run your CLI with DEV mode enabled**:
100
+ ```bash
101
+ npm run dev:cli [options]
102
+ ```
103
+
104
+ Or manually:
105
+ ```bash
106
+ npm run build
107
+ DEV=true node dist/cli.js [options]
108
+ ```
109
+
110
+ The React DevTools window will show your CLI component tree, allowing you to inspect props, state, and component hierarchy in real-time.
111
+
112
+ ## Requirements
113
+
114
+ - Node.js >= 16
115
+ - npm, pnpm, or yarn
116
+
117
+ ## License
118
+
119
+ MIT