Skip to content

Commit aeb6af4

Browse files
author
Ramu Narasinga
committed
added comments helper function
1 parent dc6fb3f commit aeb6af4

File tree

1 file changed

+9
-2
lines changed

1 file changed

+9
-2
lines changed

create-next-app/index.ts

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -253,7 +253,7 @@ async function run(): Promise<void> {
253253
if (validation.valid) {
254254
return true
255255
}
256-
return 'Invalid project name: ' + validation.problems[0]
256+
return '[WORKS]:Invalid project name: ' + validation.problems[0]
257257
},
258258
})
259259

@@ -273,13 +273,18 @@ async function run(): Promise<void> {
273273
process.exit(1)
274274
}
275275

276+
// let's log this and see what is that values its got
276277
const resolvedProjectPath = path.resolve(projectPath)
277278
const projectName = path.basename(resolvedProjectPath)
279+
console.log("resolvedProjectPath", resolvedProjectPath)
280+
console.log("projectName", projectName)
278281

282+
// I believe this is already handled in the above prompts call.
283+
// Don't think this is necessary.
279284
const validation = validateNpmName(projectName)
280285
if (!validation.valid) {
281286
console.error(
282-
`Could not create a project called ${red(
287+
`[TEST]::Could not create a project called ${red(
283288
`"${projectName}"`
284289
)} because of npm naming restrictions:`
285290
)
@@ -304,6 +309,8 @@ async function run(): Promise<void> {
304309
const appName = path.basename(root)
305310
const folderExists = fs.existsSync(root)
306311

312+
console.log("root", root, "appName", appName, "folderExists", folderExists)
313+
307314
if (folderExists && !isFolderEmpty(root, appName)) {
308315
process.exit(1)
309316
}

0 commit comments

Comments
 (0)