create-lumen 2.0.0-alpha.1 → 2.0.0-alpha.2

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 (63) hide show
  1. package/README.md +15 -7
  2. package/bin/cli.js +1 -0
  3. package/package.json +2 -2
  4. package/schema/fixtures/v2/invalid/shadcn-without-tailwind.json +1 -1
  5. package/schema/fixtures/v2/valid/react-vite-type-based.json +1 -1
  6. package/schema/lumen.config.v2.json +0 -1
  7. package/src/cli-args.js +65 -3
  8. package/src/configure.js +4 -0
  9. package/src/css.js +14 -30
  10. package/src/dependencies.js +28 -18
  11. package/src/engine/capabilities.js +174 -4
  12. package/src/engine/composition.js +644 -0
  13. package/src/engine/index.js +1 -0
  14. package/src/injector.js +294 -446
  15. package/src/main.js +6 -7
  16. package/src/manifest/schema.js +1 -1
  17. package/src/prompts.js +459 -247
  18. package/src/readme.js +23 -2
  19. package/src/scaffold.js +17 -0
  20. package/templates/architectures/hybrid/main.jsx +10 -0
  21. package/templates/architectures/hybrid/main.tsx +10 -0
  22. package/templates/architectures/hybrid/src/App.jsx +20 -0
  23. package/templates/architectures/hybrid/src/App.tsx +20 -0
  24. package/templates/architectures/hybrid/src/shared/components/ui/Button.jsx +31 -0
  25. package/templates/architectures/hybrid/src/shared/components/ui/Button.tsx +36 -0
  26. package/templates/architectures/hybrid/src/shared/components/ui/index.js +1 -0
  27. package/templates/architectures/hybrid/src/shared/components/ui/index.ts +1 -0
  28. package/templates/architectures/hybrid/src/shared/hooks/useLocalStorage.jsx +28 -0
  29. package/templates/architectures/hybrid/src/shared/hooks/useLocalStorage.ts +28 -0
  30. package/templates/architectures/hybrid/src/shared/layouts/.gitkeep +0 -0
  31. package/templates/architectures/hybrid/src/shared/stores/.gitkeep +0 -0
  32. package/templates/architectures/hybrid/src/shared/styles/.gitkeep +0 -0
  33. package/templates/architectures/hybrid/src/shared/types/index.js +20 -0
  34. package/templates/architectures/hybrid/src/shared/types/index.ts +16 -0
  35. package/templates/architectures/hybrid/src/shared/utils/cn.jsx +3 -0
  36. package/templates/architectures/hybrid/src/shared/utils/cn.ts +5 -0
  37. package/templates/architectures/none/main.jsx +10 -0
  38. package/templates/architectures/none/main.tsx +10 -0
  39. package/templates/architectures/none/src/App.jsx +15 -0
  40. package/templates/architectures/none/src/App.tsx +15 -0
  41. package/templates/architectures/none/src/styles/.gitkeep +1 -0
  42. package/templates/architectures/none/src/types/index.js +20 -0
  43. package/templates/architectures/none/src/types/index.ts +16 -0
  44. package/templates/conditional/testing/jest/hybrid/src/__tests__/App.test.jsx +11 -0
  45. package/templates/conditional/testing/jest/hybrid/src/__tests__/App.test.tsx +11 -0
  46. package/templates/conditional/testing/jest/none/src/__tests__/App.test.jsx +11 -0
  47. package/templates/conditional/testing/jest/none/src/__tests__/App.test.tsx +11 -0
  48. package/templates/conditional/testing/vitest/hybrid/src/__tests__/App.test.jsx +10 -0
  49. package/templates/conditional/testing/vitest/hybrid/src/__tests__/App.test.tsx +10 -0
  50. package/templates/conditional/testing/vitest/none/src/__tests__/App.test.jsx +10 -0
  51. package/templates/conditional/testing/vitest/none/src/__tests__/App.test.tsx +10 -0
  52. package/templates/css/tailwind/src/globals.css +10 -0
  53. package/templates/css/tailwind/src/themes.css +86 -4
  54. package/templates/ui/shadcn/lib/utils.js +6 -0
  55. package/templates/ui/shadcn/lib/utils.ts +6 -0
  56. package/templates/ui/shadcn/primitives/Button.jsx +48 -0
  57. package/templates/ui/shadcn/primitives/Button.tsx +59 -0
  58. package/templates/ui/shadcn/primitives/Card.jsx +55 -0
  59. package/templates/ui/shadcn/primitives/Card.tsx +73 -0
  60. package/templates/ui/shadcn/primitives/index.js +9 -0
  61. package/templates/ui/shadcn/primitives/index.ts +9 -0
  62. package/templates/css/bootstrap/src/themes.css +0 -14
  63. /package/templates/{css/bootstrap/src/globals.css → architectures/hybrid/src/features/.gitkeep} +0 -0
package/src/main.js CHANGED
@@ -48,6 +48,7 @@ export async function main(options = {}) {
48
48
  projectName: nameArg,
49
49
  manifest: manifestSource,
50
50
  template: templateName,
51
+ arch: archArg,
51
52
  } = options;
52
53
  const pkg = getPkgManager();
53
54
 
@@ -93,7 +94,7 @@ export async function main(options = {}) {
93
94
  ...preset,
94
95
  };
95
96
  } else {
96
- responses = await getUserInputs(projectName, { quickSetup });
97
+ responses = await getUserInputs(projectName, { quickSetup, initialArch: archArg });
97
98
  }
98
99
 
99
100
  const projectPath = path.resolve(CURRENT_DIR, projectName);
@@ -136,7 +137,7 @@ export async function main(options = {}) {
136
137
  // 7. Inject architecture templates
137
138
  const archSpin = spinner();
138
139
  archSpin.start(
139
- `Setting up ${responses.architecture === "feature-based" ? "feature-based" : "type-based"} architecture...`
140
+ `Setting up ${responses.architecture} architecture...`
140
141
  );
141
142
  try {
142
143
  await injectArchitecture(
@@ -194,11 +195,9 @@ export async function main(options = {}) {
194
195
  // 10. CSS framework setup
195
196
  const cssSpin = spinner();
196
197
  const cssLabel =
197
- responses.cssFramework === "none"
198
- ? "CSS reset"
199
- : responses.cssFramework === "tailwind"
198
+ responses.cssFramework === "tailwind"
200
199
  ? "Tailwind CSS"
201
- : "Bootstrap";
200
+ : "CSS reset";
202
201
  if (responses.cssFramework !== "none") {
203
202
  cssSpin.start(`Setting up ${cssLabel}...`);
204
203
  }
@@ -290,7 +289,7 @@ export async function main(options = {}) {
290
289
  log.step(chalk.green("\nProject setup complete!"));
291
290
  log.message(
292
291
  chalk.gray(
293
- ` Architecture: ${responses.architecture === "feature-based" ? "Feature-based" : "Type-based"}`
292
+ ` Architecture: ${responses.architecture}`
294
293
  )
295
294
  );
296
295
 
@@ -12,7 +12,7 @@ export const FRAMEWORK_VARIANTS = ["vite", "app-router", "pages-router"];
12
12
  export const FRAMEWORK_BUNDLERS = ["turbopack", "webpack"];
13
13
  export const FRAMEWORK_ADAPTERS = ["node", "vercel", "cloudflare", "static"];
14
14
 
15
- export const STYLING_ENGINES = ["tailwind", "bootstrap", "none"];
15
+ export const STYLING_ENGINES = ["tailwind", "none"];
16
16
  export const ARCHITECTURE_PRESETS = ["feature-based", "type-based", "hybrid", "none"];
17
17
  // Legacy alias: docs used architecture.type, canonical is architecture.preset.
18
18
  // Keep both in sync; parseManifest normalizes to expose both keys.