Join GitHub today
GitHub is home to over 40 million developers working together to host and review code, manage projects, and build software together.Sign up
CLI issues: Generated app default Project name invalid if CWD name has hyphens + why not generate in CWD #2092
More importantly, why bother suggesting this if it's going to create a sub-directory anyway.
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
See "Other examples" below.
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
Edit: actually it is there:
nigel@cloudshell:~$ mkdir loopback-next && cd $_ && lb4 app ? Project name: (loopback next) >> Invalid npm package name: loopback next
? Project name: loopback-next Application loopback-next was created in loopback-next. nigel@cloudshell:~/loopback-next$ ls loopback-next
I just scaffolded an application with project name
For this one, it looks like a bug.
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.