new command should clone a github repository ?
Hey @KerryRitter,
Why cloning a repository from github ? It could be better to create the project from a local directory, isn't it ?
We can pass the language (ts or es) in params and it will copy the project from this directory with the right code and right configuration. In other way, this local directory is better for demonstrations of the CLI tool without Internet connection ;-) And finally It could be helpful for maintaining the CLI tool.
I've seen this article https://www.sitepoint.com/scaffolding-tool-caporal-js/ that explain how to.
What do think about it ?
Great work by the way
My main inspiration for choosing that route is because it is similar to how the Ionic CLI works. As a user, it is pleasant because you can insert alternative starter templates (i.e. those listed in the @nestjs readme) without friction. As a developer on the CLI, I think it's a good idea because it allows us to version the starter template without versioning the CLI - anecdotally, I've noticed people tend to not upgrade the CLI very often.
Also, in regards to not needing an internet connection, an internet connection will be required to install all the node packages necessary to run the Nest application. I don't think requiring the CLI to sync the NPM packages with the Nest framework is ideal, nor do I think packaging all of the node_modules with the CLI is ideal.
As far as passing the language in as a param, we are currently going down the direction of using a nestconfig.json file. Otherwise, every CLI command must be parameterized with --ts or --es... and that just sounds exhausting :)
I'm open to changes, but in my experience using a git repo pattern has been very pleasant. @kamilmysliwiec, what are your thoughts on this?
Hey @KerryRitter,
Thanks a lot for your answers !
You right I missed a lot of things in my question about the Internet connection.
Let's try this pattern. I didn't think about a remote templates added from @nestjs README. It seems to be better actually !
We can close the issue.