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.
- package/README.md +15 -7
- package/bin/cli.js +1 -0
- package/package.json +2 -2
- package/schema/fixtures/v2/invalid/shadcn-without-tailwind.json +1 -1
- package/schema/fixtures/v2/valid/react-vite-type-based.json +1 -1
- package/schema/lumen.config.v2.json +0 -1
- package/src/cli-args.js +65 -3
- package/src/configure.js +4 -0
- package/src/css.js +14 -30
- package/src/dependencies.js +28 -18
- package/src/engine/capabilities.js +174 -4
- package/src/engine/composition.js +644 -0
- package/src/engine/index.js +1 -0
- package/src/injector.js +294 -446
- package/src/main.js +6 -7
- package/src/manifest/schema.js +1 -1
- package/src/prompts.js +459 -247
- package/src/readme.js +23 -2
- package/src/scaffold.js +17 -0
- package/templates/architectures/hybrid/main.jsx +10 -0
- package/templates/architectures/hybrid/main.tsx +10 -0
- package/templates/architectures/hybrid/src/App.jsx +20 -0
- package/templates/architectures/hybrid/src/App.tsx +20 -0
- package/templates/architectures/hybrid/src/shared/components/ui/Button.jsx +31 -0
- package/templates/architectures/hybrid/src/shared/components/ui/Button.tsx +36 -0
- package/templates/architectures/hybrid/src/shared/components/ui/index.js +1 -0
- package/templates/architectures/hybrid/src/shared/components/ui/index.ts +1 -0
- package/templates/architectures/hybrid/src/shared/hooks/useLocalStorage.jsx +28 -0
- package/templates/architectures/hybrid/src/shared/hooks/useLocalStorage.ts +28 -0
- package/templates/architectures/hybrid/src/shared/layouts/.gitkeep +0 -0
- package/templates/architectures/hybrid/src/shared/stores/.gitkeep +0 -0
- package/templates/architectures/hybrid/src/shared/styles/.gitkeep +0 -0
- package/templates/architectures/hybrid/src/shared/types/index.js +20 -0
- package/templates/architectures/hybrid/src/shared/types/index.ts +16 -0
- package/templates/architectures/hybrid/src/shared/utils/cn.jsx +3 -0
- package/templates/architectures/hybrid/src/shared/utils/cn.ts +5 -0
- package/templates/architectures/none/main.jsx +10 -0
- package/templates/architectures/none/main.tsx +10 -0
- package/templates/architectures/none/src/App.jsx +15 -0
- package/templates/architectures/none/src/App.tsx +15 -0
- package/templates/architectures/none/src/styles/.gitkeep +1 -0
- package/templates/architectures/none/src/types/index.js +20 -0
- package/templates/architectures/none/src/types/index.ts +16 -0
- package/templates/conditional/testing/jest/hybrid/src/__tests__/App.test.jsx +11 -0
- package/templates/conditional/testing/jest/hybrid/src/__tests__/App.test.tsx +11 -0
- package/templates/conditional/testing/jest/none/src/__tests__/App.test.jsx +11 -0
- package/templates/conditional/testing/jest/none/src/__tests__/App.test.tsx +11 -0
- package/templates/conditional/testing/vitest/hybrid/src/__tests__/App.test.jsx +10 -0
- package/templates/conditional/testing/vitest/hybrid/src/__tests__/App.test.tsx +10 -0
- package/templates/conditional/testing/vitest/none/src/__tests__/App.test.jsx +10 -0
- package/templates/conditional/testing/vitest/none/src/__tests__/App.test.tsx +10 -0
- package/templates/css/tailwind/src/globals.css +10 -0
- package/templates/css/tailwind/src/themes.css +86 -4
- package/templates/ui/shadcn/lib/utils.js +6 -0
- package/templates/ui/shadcn/lib/utils.ts +6 -0
- package/templates/ui/shadcn/primitives/Button.jsx +48 -0
- package/templates/ui/shadcn/primitives/Button.tsx +59 -0
- package/templates/ui/shadcn/primitives/Card.jsx +55 -0
- package/templates/ui/shadcn/primitives/Card.tsx +73 -0
- package/templates/ui/shadcn/primitives/index.js +9 -0
- package/templates/ui/shadcn/primitives/index.ts +9 -0
- package/templates/css/bootstrap/src/themes.css +0 -14
- /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
|
|
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 === "
|
|
198
|
-
? "CSS reset"
|
|
199
|
-
: responses.cssFramework === "tailwind"
|
|
198
|
+
responses.cssFramework === "tailwind"
|
|
200
199
|
? "Tailwind CSS"
|
|
201
|
-
: "
|
|
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
|
|
292
|
+
` Architecture: ${responses.architecture}`
|
|
294
293
|
)
|
|
295
294
|
);
|
|
296
295
|
|
package/src/manifest/schema.js
CHANGED
|
@@ -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", "
|
|
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.
|