You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
lb4 app suggests a project name based on CWD. If this has hyphens they are replaced with spaces so the default suggested name is invalid.
More importantly, why bother suggesting this if it's going to create a sub-directory anyway.
Why not either:
create the project in CWD (that's why I created a folder for it!)
if it must be created in a subdir, just suggest "package" or "code", since I don't really want a structure my-project/my-project by default (From my home the default suggestion creates ~/username as the project directory.)
I can see the logic of not just spawning into my home directory, for example, without warning and I know other generators follow this pattern, but my preference would be just make directory, copy into that with WARN this is the current directory & make clear the Project name is really for the package.json.
See "Other examples" below.
ALSO
I am asked to enter the
Project root directory
but if I enter a path, the generator appears to complete, but doesn't actually create the directory:
? Project root directory: ~/my-lb4-app/code
create .npmrc
create .prettierignore
create .prettierrc
...
added 528 packages in 18.892s
Application nigel was created in~/my-lb4-app/code
nigel@cloudshell:~$ cd~/my-lb4-app/code
-bash: cd: /home/nigel/my-lb4-app/code: No such file or directory
? Project name: loopback-next
Application loopback-next was created in loopback-next.
nigel@cloudshell:~/loopback-next$ ls
loopback-next
The text was updated successfully, but these errors were encountered:
cloudwheels
changed the title
CLI issues: Generated app default Project name invalid if CWD name has hyphens + why not generate in CWD + copy error not thrown
CLI issues: Generated app default Project name invalid if CWD name has hyphens + why not generate in CWD
Nov 28, 2018
If this has hyphens they are replaced with spaces so the default suggested name is invalid.
I just scaffolded an application with project name test-1-2-3, and it seems to be working as expected. It is being created in the test-1-2-3 directory. Is it what you're seeing too?
More importantly, why bother suggesting this if it's going to create a sub-directory anyway.
I believe it's possible to create a new LB4 inside an existing directory too. It's an important option making it easy to scaffold a new LB4 project in a directory already initialized e.g. when creating a new GitHub repository.
Current Behavior
lb4 app
suggests a project name based on CWD. If this has hyphens they are replaced with spaces so the default suggested name is invalid.More importantly, why bother suggesting this if it's going to create a sub-directory anyway.
Why not either:
package
" or "code
", since I don't really want a structuremy-project/my-project
by default (From my home the default suggestion creates~/username
as the project directory.)I can see the logic of not just spawning into my home directory, for example, without warning and I know other generators follow this pattern, but my preference would be just make directory, copy into that with WARN this is the current directory & make clear the Project name is really for the
package.json
.See "Other examples" below.
ALSO
I am asked to enter the
but if I enter a path, the generator appears to complete, but doesn't actually create the directory:
Edit: actually it is there:
Ewww.
Other examples:
The text was updated successfully, but these errors were encountered: