Skip to content

Commit f1df727

Browse files
committed
chore: fix projectDir check
1 parent 9a88a55 commit f1df727

File tree

3 files changed

+8
-8
lines changed

3 files changed

+8
-8
lines changed

package-lock.json

+1-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "superplate-cli",
3-
"version": "1.10.0",
3+
"version": "1.10.1",
44
"description": "The frontend boilerplate with superpowers",
55
"license": "MIT",
66
"repository": {

src/cli.ts

+6-6
Original file line numberDiff line numberDiff line change
@@ -93,10 +93,10 @@ const cli = async (): Promise<void> => {
9393
/**
9494
* Check for project-directory defined
9595
*/
96-
const [projectDir] =
97-
program.args.length === 0
98-
? [getRandomName().replace(/\s/g, "-").toLowerCase()]
99-
: program.args;
96+
const [projectDir] = program.args;
97+
98+
const finalProjectDir =
99+
projectDir ?? getRandomName().replace(/\s/g, "-").toLowerCase();
100100

101101
/**
102102
* get source path
@@ -172,9 +172,9 @@ const cli = async (): Promise<void> => {
172172

173173
const sao = new SAO({
174174
generator,
175-
outDir: projectDir,
175+
outDir: finalProjectDir,
176176
logLevel: program.debug ? 4 : 1,
177-
appName: projectDir,
177+
appName: finalProjectDir,
178178
answers: withAnswers,
179179
extras: {
180180
debug: !!program.debug,

0 commit comments

Comments
 (0)