create-what 0.1.3 → 0.2.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 (2) hide show
  1. package/index.js +15 -4
  2. package/package.json +1 -1
package/index.js CHANGED
@@ -46,15 +46,23 @@ const dirs = [
46
46
  ];
47
47
  dirs.forEach(d => mkdirSync(join(root, d), { recursive: true }));
48
48
 
49
+ // --- .gitignore ---
50
+ writeFileSync(join(root, '.gitignore'), `node_modules
51
+ dist
52
+ .vite
53
+ .DS_Store
54
+ *.local
55
+ `);
56
+
49
57
  // --- package.json ---
50
58
  const pkgDeps = {
51
- 'what-framework': '^0.1.0',
59
+ 'what-framework': '^0.2.0',
52
60
  'what-framework-cli': '^0.1.0',
53
61
  };
54
62
 
55
63
  const pkgDevDeps = useJSX
56
64
  ? {
57
- 'what-compiler': '^0.1.0',
65
+ 'what-compiler': '^0.2.0',
58
66
  '@babel/core': '^7.23.0',
59
67
  'vite': '^5.0.0',
60
68
  }
@@ -443,10 +451,12 @@ ${useJSX ? ' vite.config.js # Vite + what-compiler plugin\n' : ''} package.
443
451
  ## Learn More
444
452
 
445
453
  - [What Framework docs](https://github.com/aspect/what-fw)
446
- - JSX authoring: uses \`what-compiler\` to transform JSX to optimized DOM calls
454
+ - JSX authoring: uses \`what-compiler\` to compile JSX to h() calls through the core reconciler
447
455
  - Vanilla authoring: use \`h(tag, props, ...children)\` directly -- zero build step needed
448
456
  `);
449
457
 
458
+ // --- styles.css (move from public/ to root for Vite) ---
459
+
450
460
  // --- Done ---
451
461
  console.log(` Done! Next steps:\n`);
452
462
  console.log(` cd ${name}`);
@@ -455,7 +465,8 @@ console.log(` npm run dev\n`);
455
465
 
456
466
  if (useJSX) {
457
467
  console.log(` JSX mode enabled. Components use .jsx extensions.`);
458
- console.log(` The what-compiler Vite plugin handles JSX transformation.\n`);
468
+ console.log(` The what-compiler Vite plugin compiles JSX to h() calls.`);
469
+ console.log(` Open http://localhost:5173 after running dev.\n`);
459
470
  } else {
460
471
  console.log(` Vanilla mode. Components use h() calls -- no compiler needed.\n`);
461
472
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "create-what",
3
- "version": "0.1.3",
3
+ "version": "0.2.0",
4
4
  "description": "Scaffold a new What Framework project",
5
5
  "type": "module",
6
6
  "bin": {