create-what 0.4.2 → 0.5.1

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 (2) hide show
  1. package/index.js +16 -2
  2. package/package.json +1 -1
package/index.js CHANGED
@@ -42,11 +42,11 @@ writeFileSync(join(root, 'package.json'), JSON.stringify({
42
42
  preview: 'vite preview',
43
43
  },
44
44
  dependencies: {
45
- 'what-framework': '^0.4.2',
45
+ 'what-framework': '^0.5.1',
46
46
  },
47
47
  devDependencies: {
48
48
  vite: '^5.4.0',
49
- ...(useJSX ? { 'what-compiler': '^0.4.2' } : {}),
49
+ ...(useJSX ? { 'what-compiler': '^0.5.1' } : {}),
50
50
  },
51
51
  }, null, 2) + '\n');
52
52
 
@@ -56,6 +56,7 @@ writeFileSync(join(root, 'index.html'), `<!doctype html>
56
56
  <meta charset="UTF-8" />
57
57
  <meta name="viewport" content="width=device-width, initial-scale=1.0" />
58
58
  <title>${projectName}</title>
59
+ <link rel="icon" type="image/svg+xml" href="/favicon.svg" />
59
60
  <link rel="stylesheet" href="/src/styles.css" />
60
61
  </head>
61
62
  <body>
@@ -65,6 +66,18 @@ writeFileSync(join(root, 'index.html'), `<!doctype html>
65
66
  </html>
66
67
  `);
67
68
 
69
+ writeFileSync(join(root, 'public', 'favicon.svg'), `<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 64 64">
70
+ <defs>
71
+ <linearGradient id="g" x1="0" x2="1" y1="0" y2="1">
72
+ <stop offset="0%" stop-color="#2563eb" />
73
+ <stop offset="100%" stop-color="#1d4ed8" />
74
+ </linearGradient>
75
+ </defs>
76
+ <rect width="64" height="64" rx="14" fill="url(#g)" />
77
+ <path d="M17 20h10l5 20 5-20h10L36 49h-8z" fill="#fff" />
78
+ </svg>
79
+ `);
80
+
68
81
  if (useJSX) {
69
82
  writeFileSync(join(root, 'vite.config.js'), `import { defineConfig } from 'vite';
70
83
  import what from 'what-compiler/vite';
@@ -192,6 +205,7 @@ Open [http://localhost:5173](http://localhost:5173).
192
205
  - Canonical package name is \`what-framework\`.
193
206
  - JSX path is compiler-first and recommended.
194
207
  - Runtime \`h()\` path is available with \`--vanilla\`.
208
+ - Vite is preconfigured under the hood; use \`npm run dev/build/preview\`.
195
209
  - Event handlers accept both \`onClick\` and \`onclick\`; docs and templates use \`onClick\`.
196
210
  `);
197
211
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "create-what",
3
- "version": "0.4.2",
3
+ "version": "0.5.1",
4
4
  "description": "Scaffold a new What Framework project",
5
5
  "type": "module",
6
6
  "bin": {