create-what 0.5.4 → 0.5.5
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/index.js +8 -25
- package/package.json +2 -3
package/index.js
CHANGED
|
@@ -123,18 +123,17 @@ async function gatherOptions() {
|
|
|
123
123
|
|
|
124
124
|
function generatePackageJson(projectName, { reactCompat, cssApproach }) {
|
|
125
125
|
const deps = {
|
|
126
|
-
'what-framework': '^0.5.
|
|
126
|
+
'what-framework': '^0.5.4',
|
|
127
127
|
};
|
|
128
128
|
const devDeps = {
|
|
129
129
|
vite: '^6.0.0',
|
|
130
|
-
'what-compiler': '^0.5.
|
|
131
|
-
'
|
|
132
|
-
'what-devtools-mcp': '^0.1.0',
|
|
130
|
+
'what-compiler': '^0.5.4',
|
|
131
|
+
'@babel/core': '^7.23.0',
|
|
133
132
|
};
|
|
134
133
|
|
|
135
134
|
if (reactCompat) {
|
|
136
135
|
deps['what-react'] = '^0.1.0';
|
|
137
|
-
deps['what-core'] = '^0.5.
|
|
136
|
+
deps['what-core'] = '^0.5.4';
|
|
138
137
|
// Include zustand as a demo React library
|
|
139
138
|
deps['zustand'] = '^5.0.0';
|
|
140
139
|
}
|
|
@@ -170,9 +169,6 @@ function generateViteConfig({ reactCompat, cssApproach }) {
|
|
|
170
169
|
|
|
171
170
|
imports.push(`import { defineConfig } from 'vite';`);
|
|
172
171
|
|
|
173
|
-
// AI-powered debugging — auto-injects devtools in dev mode
|
|
174
|
-
imports.push(`import whatDevToolsMCP from 'what-devtools-mcp/vite-plugin';`);
|
|
175
|
-
|
|
176
172
|
if (reactCompat) {
|
|
177
173
|
// React compat projects use the what-react Vite plugin instead of the
|
|
178
174
|
// What compiler. The what-react plugin aliases react/react-dom imports
|
|
@@ -185,8 +181,6 @@ function generateViteConfig({ reactCompat, cssApproach }) {
|
|
|
185
181
|
plugins.push('what()');
|
|
186
182
|
}
|
|
187
183
|
|
|
188
|
-
plugins.push('whatDevToolsMCP()');
|
|
189
|
-
|
|
190
184
|
if (cssApproach === 'tailwind') {
|
|
191
185
|
imports.push(`import tailwindcss from '@tailwindcss/vite';`);
|
|
192
186
|
plugins.push('tailwindcss()');
|
|
@@ -847,8 +841,9 @@ async function main() {
|
|
|
847
841
|
|
|
848
842
|
mkdirSync(join(root, 'src'), { recursive: true });
|
|
849
843
|
mkdirSync(join(root, 'public'), { recursive: true });
|
|
850
|
-
|
|
851
|
-
mkdirSync(join(root, '.
|
|
844
|
+
// MCP config dirs — created but left empty until what-devtools-mcp is published
|
|
845
|
+
// mkdirSync(join(root, '.claude'), { recursive: true });
|
|
846
|
+
// mkdirSync(join(root, '.cursor'), { recursive: true });
|
|
852
847
|
|
|
853
848
|
// .gitignore
|
|
854
849
|
writeFileSync(join(root, '.gitignore'), `node_modules\ndist\n.DS_Store\n`);
|
|
@@ -882,7 +877,7 @@ async function main() {
|
|
|
882
877
|
module: 'ESNext',
|
|
883
878
|
moduleResolution: 'bundler',
|
|
884
879
|
jsx: 'preserve',
|
|
885
|
-
jsxImportSource: 'what-
|
|
880
|
+
jsxImportSource: 'what-framework',
|
|
886
881
|
strict: true,
|
|
887
882
|
noEmit: true,
|
|
888
883
|
skipLibCheck: true,
|
|
@@ -908,18 +903,6 @@ async function main() {
|
|
|
908
903
|
],
|
|
909
904
|
}, null, 2) + '\n');
|
|
910
905
|
|
|
911
|
-
// MCP configs for AI-powered debugging (what-devtools-mcp)
|
|
912
|
-
const mcpConfig = JSON.stringify({
|
|
913
|
-
mcpServers: {
|
|
914
|
-
'what-devtools': {
|
|
915
|
-
command: 'npx',
|
|
916
|
-
args: ['what-devtools-mcp'],
|
|
917
|
-
},
|
|
918
|
-
},
|
|
919
|
-
}, null, 2) + '\n';
|
|
920
|
-
writeFileSync(join(root, '.claude', 'mcp.json'), mcpConfig);
|
|
921
|
-
writeFileSync(join(root, '.cursor', 'mcp.json'), mcpConfig);
|
|
922
|
-
|
|
923
906
|
// src/main.jsx
|
|
924
907
|
writeFileSync(join(root, 'src', 'main.jsx'), generateMainJsx(options));
|
|
925
908
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "create-what",
|
|
3
|
-
"version": "0.5.
|
|
3
|
+
"version": "0.5.5",
|
|
4
4
|
"description": "Scaffold a new What Framework project",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"bin": {
|
|
@@ -8,8 +8,7 @@
|
|
|
8
8
|
},
|
|
9
9
|
"main": "index.js",
|
|
10
10
|
"files": [
|
|
11
|
-
"index.js"
|
|
12
|
-
"templates"
|
|
11
|
+
"index.js"
|
|
13
12
|
],
|
|
14
13
|
"keywords": [
|
|
15
14
|
"create",
|