Open sooraj1002 opened 6 months ago
@sooraj1002 So instead of installing it directly, we will have to store it in dependencies and then prompt user for package manager of his choice to install the dependencies? Can't we just install it when the specific module is being generated?
yarn.lock
or pnpm.lock
file, we can directly assume thats the package manager we have to use@techsavvyash can you also confirm this once?
Yes, this is the correct approach, incase a direct install fails, it will not update the package.json
making it very difficult for the end user to figure out what all dependencies are required giving a very bad UX, we must first update the package.json
manually, which should be easy work, then we should check for the existence of lock files, incase of conflict, just prompt the user for the package manager and use that.
Additionally the registry feature that @Savio629 added can be used to store the package manager of user's choice as well removing the need to check for package manager over and over again.
Presently, the cli while setting up a service using the generate command instead of setting it up during the bootstrapping phase does not install the external/extra dependencies if any. This should not be the case, those should be added alongside the service setup.
The goal of this issue is to update the package.json when user runs the generate
command and prompt user on which package manager he needs to install the packages or use the registry generated here https://github.com/SamagraX-Stencil/stencil-cli/pull/20 to know which package manager the user has chosen while bootstraping the project.
Before generate command |
After generate command |
---|
Stencil-Cli
SamagraX
Command Line Interface
TypeScript, Cli
please assign me : )
Description
Presently, the cli while setting up a service using the
generate
command instead of setting it up during the bootstrapping phase does not install the external/extra dependencies if any. This should not be the case, those should be added alongside the service setup.Potential fix
lock
file in the package root, if the package root contains onlyyarn.lock
orpnpm.lock
useyarn
orpnpm
respectively, incase there is no lock file of multiple lock files default tonpm
.package.json
to add the dependency with the particular version that is required and print a message for the user to install the new dependencies using a package manager of their choice.Objective
The goal of this issue is to update the package.json when user runs the
generate
command and prompt user on which package manager he needs to install the packages or use the registry generated here https://github.com/SamagraX-Stencil/stencil-cli/pull/20 to know which package manager the user has chosen while bootstraping the project.Goals
generate
commandgenerate
commandComplexity : Medium
Product Name
Stencil-Cli
Organisation Name
SamagraX
Domain
Command Line Interface
Tech Skills Needed
TypeScript, Cli