create-lumen 1.1.2 → 1.1.3
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 +4 -0
- package/package.json +1 -1
- package/src/main.js +3 -1
package/README.md
CHANGED
|
@@ -18,8 +18,12 @@ Non-interactive Quick Setup (TypeScript + Tailwind + Feature-based + Router + ES
|
|
|
18
18
|
|
|
19
19
|
```bash
|
|
20
20
|
npm create lumen my-app -y
|
|
21
|
+
# or
|
|
22
|
+
npm create lumen -y my-app
|
|
21
23
|
```
|
|
22
24
|
|
|
25
|
+
The CLI ignores flag arguments when resolving the project name, so `-y` can appear before or after the app name without being mistaken for the folder name.
|
|
26
|
+
|
|
23
27
|
Run the scaffolder locally (development / testing the generator):
|
|
24
28
|
|
|
25
29
|
```bash
|
package/package.json
CHANGED
package/src/main.js
CHANGED
|
@@ -22,7 +22,9 @@ const TEMPLATES_DIR = path.join(__dirname, "../templates");
|
|
|
22
22
|
const CURRENT_DIR = process.cwd();
|
|
23
23
|
|
|
24
24
|
export function resolveProjectName({ quickSetup = false, projectName: nameArg, cwd = CURRENT_DIR } = {}) {
|
|
25
|
-
const
|
|
25
|
+
const cliArgs = (process.argv.slice(2) ?? []).filter((arg) => arg && !arg.startsWith("-"));
|
|
26
|
+
const cliArg = nameArg || cliArgs[0] || null;
|
|
27
|
+
|
|
26
28
|
if (cliArg && cliArg.trim()) {
|
|
27
29
|
return cliArg.trim();
|
|
28
30
|
}
|