create-vorzelajs 0.0.9 → 0.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/dist/index.js +19 -1
- package/package.json +1 -1
- package/templates/bare/README.md +15 -1
- package/templates/bare/src/routes/index.tsx +8 -1
- package/templates/base/public/icon-192.png +0 -0
- package/templates/base/public/icon-512.png +0 -0
- package/templates/modern/README.md +10 -1
- package/templates/modern/src/routes/index.tsx +9 -9
package/dist/index.js
CHANGED
|
@@ -31,6 +31,13 @@ async function pathExists(p) {
|
|
|
31
31
|
return false;
|
|
32
32
|
}
|
|
33
33
|
}
|
|
34
|
+
function generateViteConfig(config) {
|
|
35
|
+
const optionsArg = config.pwa ? ', { pwa: true }' : '';
|
|
36
|
+
return `import { resolveVorzelaConfig } from 'vorzelajs/vite'
|
|
37
|
+
|
|
38
|
+
export default resolveVorzelaConfig(import.meta.dirname${optionsArg})
|
|
39
|
+
`;
|
|
40
|
+
}
|
|
34
41
|
function generatePackageJson(config) {
|
|
35
42
|
const pkg = {
|
|
36
43
|
name: config.name,
|
|
@@ -43,7 +50,7 @@ function generatePackageJson(config) {
|
|
|
43
50
|
check: 'tsc --noEmit',
|
|
44
51
|
},
|
|
45
52
|
dependencies: {
|
|
46
|
-
vorzelajs: '^0.0.
|
|
53
|
+
vorzelajs: '^0.0.9',
|
|
47
54
|
'solid-js': '^1.9',
|
|
48
55
|
},
|
|
49
56
|
devDependencies: {
|
|
@@ -86,6 +93,14 @@ async function main() {
|
|
|
86
93
|
],
|
|
87
94
|
initial: 0,
|
|
88
95
|
},
|
|
96
|
+
{
|
|
97
|
+
type: 'toggle',
|
|
98
|
+
name: 'pwa',
|
|
99
|
+
message: 'Enable PWA?',
|
|
100
|
+
initial: false,
|
|
101
|
+
active: 'Yes',
|
|
102
|
+
inactive: 'No',
|
|
103
|
+
},
|
|
89
104
|
], {
|
|
90
105
|
onCancel() {
|
|
91
106
|
console.info('\nCancelled.');
|
|
@@ -94,6 +109,7 @@ async function main() {
|
|
|
94
109
|
});
|
|
95
110
|
const config = {
|
|
96
111
|
name: argProjectName ?? response.name ?? 'my-app',
|
|
112
|
+
pwa: response.pwa ?? false,
|
|
97
113
|
template: response.template ?? 'modern',
|
|
98
114
|
styling: response.styling ?? 'tailwindcss',
|
|
99
115
|
};
|
|
@@ -121,6 +137,8 @@ async function main() {
|
|
|
121
137
|
await fs.copyFile(stylesSource, stylesDest);
|
|
122
138
|
// 4. Generate package.json
|
|
123
139
|
await fs.writeFile(path.join(targetDir, 'package.json'), generatePackageJson(config));
|
|
140
|
+
// 5. Generate vite.config.ts
|
|
141
|
+
await fs.writeFile(path.join(targetDir, 'vite.config.ts'), generateViteConfig(config));
|
|
124
142
|
console.info(`\nDone! Next steps:\n`);
|
|
125
143
|
console.info(` cd ${config.name}`);
|
|
126
144
|
console.info(` npm install`);
|
package/package.json
CHANGED
package/templates/bare/README.md
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# My App
|
|
2
2
|
|
|
3
|
-
Built with [VorzelaJs](https://github.com/vorzela/VorzelaJS).
|
|
3
|
+
Built with [VorzelaJs](https://github.com/vorzela/VorzelaJS) - a production-ready SolidJS framework.
|
|
4
4
|
|
|
5
5
|
## Getting Started
|
|
6
6
|
|
|
@@ -20,3 +20,17 @@ src/
|
|
|
20
20
|
├── components/ # Reusable components
|
|
21
21
|
└── styles.css # Global styles
|
|
22
22
|
```
|
|
23
|
+
|
|
24
|
+
## What You Get
|
|
25
|
+
|
|
26
|
+
- **Navigation Resilience** - Automatic cancellation and race condition prevention
|
|
27
|
+
- **Persistent State** - Parent layouts preserve state across child navigations
|
|
28
|
+
- **Security Headers** - CSP with nonces, XSS protection, CORS protection
|
|
29
|
+
- **Performance** - Prefetch on hover, View Transitions API, optimized bundles
|
|
30
|
+
- **Zero Config** - No vite.config or server setup required
|
|
31
|
+
|
|
32
|
+
## Learn More
|
|
33
|
+
|
|
34
|
+
- [VorzelaJs Documentation](https://github.com/vorzela/VorzelaJS#readme)
|
|
35
|
+
- [Production Features Guide](https://github.com/vorzela/VorzelaJS/blob/main/docs/production-features.md)
|
|
36
|
+
- [SolidJS](https://www.solidjs.com/)
|
|
@@ -14,11 +14,18 @@ function HomePage() {
|
|
|
14
14
|
<div class="hero-content">
|
|
15
15
|
<h1 class="hero-title">VorzelaJs</h1>
|
|
16
16
|
<p class="hero-description">
|
|
17
|
-
|
|
17
|
+
Production-ready SolidJS framework with file-based routing, streamed SSR, and navigation resilience.
|
|
18
18
|
</p>
|
|
19
19
|
|
|
20
20
|
<CounterCard />
|
|
21
21
|
|
|
22
|
+
<div class="features-list">
|
|
23
|
+
<div class="feature-item">✅ Navigation race condition prevention</div>
|
|
24
|
+
<div class="feature-item">✅ Persistent client state across navigations</div>
|
|
25
|
+
<div class="feature-item">✅ Security headers and CSP configuration</div>
|
|
26
|
+
<div class="feature-item">✅ Prefetch on hover for instant navigation</div>
|
|
27
|
+
</div>
|
|
28
|
+
|
|
22
29
|
<nav class="hero-links">
|
|
23
30
|
<a href="https://github.com/vorzela/VorzelaJS" target="_blank" rel="noopener noreferrer" class="link">
|
|
24
31
|
GitHub
|
|
Binary file
|
|
Binary file
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# My App
|
|
2
2
|
|
|
3
|
-
Built with [VorzelaJs](https://github.com/vorzela/VorzelaJS).
|
|
3
|
+
Built with [VorzelaJs](https://github.com/vorzela/VorzelaJS) - a production-ready SolidJS framework.
|
|
4
4
|
|
|
5
5
|
## Getting Started
|
|
6
6
|
|
|
@@ -22,7 +22,16 @@ src/
|
|
|
22
22
|
└── styles.css # Global styles
|
|
23
23
|
```
|
|
24
24
|
|
|
25
|
+
## What You Get
|
|
26
|
+
|
|
27
|
+
- **Navigation Resilience** - Automatic cancellation and race condition prevention
|
|
28
|
+
- **Persistent State** - Parent layouts preserve state across child navigations
|
|
29
|
+
- **Security Headers** - CSP with nonces, XSS protection, CORS protection
|
|
30
|
+
- **Performance** - Prefetch on hover, View Transitions API, optimized bundles
|
|
31
|
+
- **Zero Config** - No vite.config or server setup required
|
|
32
|
+
|
|
25
33
|
## Learn More
|
|
26
34
|
|
|
27
35
|
- [VorzelaJs Documentation](https://github.com/vorzela/VorzelaJS#readme)
|
|
36
|
+
- [Production Features Guide](https://github.com/vorzela/VorzelaJS/blob/main/docs/production-features.md)
|
|
28
37
|
- [SolidJS](https://www.solidjs.com/)
|
|
@@ -14,23 +14,23 @@ function HomePage() {
|
|
|
14
14
|
<div class="hero-content">
|
|
15
15
|
<h1 class="hero-title">VorzelaJs</h1>
|
|
16
16
|
<p class="hero-description">
|
|
17
|
-
|
|
17
|
+
Production-ready SolidJS framework with file-based routing, streamed SSR, and navigation resilience.
|
|
18
18
|
</p>
|
|
19
19
|
|
|
20
20
|
<CounterCard />
|
|
21
21
|
|
|
22
22
|
<div class="features">
|
|
23
23
|
<div class="feature-card">
|
|
24
|
-
<h3
|
|
25
|
-
<p>
|
|
24
|
+
<h3>🚀 Production-Ready</h3>
|
|
25
|
+
<p>Navigation resilience, persistent state, and security headers built-in. Ready for real-world apps.</p>
|
|
26
26
|
</div>
|
|
27
27
|
<div class="feature-card">
|
|
28
|
-
<h3
|
|
29
|
-
<p>
|
|
28
|
+
<h3>⚡ Fast by Default</h3>
|
|
29
|
+
<p>Prefetch on hover, View Transitions API, and optimized bundles for instant navigation.</p>
|
|
30
30
|
</div>
|
|
31
31
|
<div class="feature-card">
|
|
32
|
-
<h3
|
|
33
|
-
<p>
|
|
32
|
+
<h3>🔒 Secure</h3>
|
|
33
|
+
<p>Configurable CSP, nonce-based scripts, XSS protection, and comprehensive security headers.</p>
|
|
34
34
|
</div>
|
|
35
35
|
</div>
|
|
36
36
|
|
|
@@ -38,8 +38,8 @@ function HomePage() {
|
|
|
38
38
|
<a href="https://github.com/vorzela/VorzelaJS" target="_blank" rel="noopener noreferrer" class="link">
|
|
39
39
|
GitHub
|
|
40
40
|
</a>
|
|
41
|
-
<a href="https://github.com/vorzela/VorzelaJS
|
|
42
|
-
|
|
41
|
+
<a href="https://github.com/vorzela/VorzelaJS/blob/main/docs/production-features.md" target="_blank" rel="noopener noreferrer" class="link">
|
|
42
|
+
Production Features
|
|
43
43
|
</a>
|
|
44
44
|
<a href="https://www.npmjs.com/package/vorzelajs" target="_blank" rel="noopener noreferrer" class="link">
|
|
45
45
|
npm
|