-
-
Notifications
You must be signed in to change notification settings - Fork 1.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[create-svelte] provide command line params to run npm init svelte
non-interactively
#2348
Comments
This has come up before but I can't find the issue right now. My comment before was that I'm worried about committing to what is effectively a public API for this, with the potential for breaking changes. If we want to add other options, would it mean that previously non-interactive invocations of the command (with certain CLI options) would suddenly become interactive? That doesn't sound desirable, but neither does bumping a major version whenever we do something that might disrupt people attempting to use this in a non-interactive way. We have a lot more freedom to adjust and improve the CLI if we make sure that it's only humans interacting with it, who can respond to prompts that change over time. If you have a need for non-interactive and reproducible starter projects, you should probably just run the CLI once yourself and save that somewhere and use that going forward. |
Thanks a lot for pointing this out, I haven't though about it as a public API, but it really is. I think one way to prevent, or at least attenuate, the effect of adding options would be to make all optiond default to NO when running non-interactively. That is, unless specified otherwise, That way, when eventually new feature are added, the default behaviour would be the same. I think it's a nice feature to automatize the creation of apps, building scrtips, reporting errors, writing tutorials, etc. |
Thanks a lot @babichjacob , that's exactly what I was looking for. Could you tel me where are all available options documented? BTW, I thinks svelte adders are one of sveltekit's killer features, GREAT JOB! I hope it gets properly documented (and promoted) once the stable version is released. It's really great to have all this common tasks already solved and supported by the community. |
You can see the parameters here: svelte-add/projects/create-kit/__init.js The actual parameters in |
Describe the problem
I want to create a new SvelteKit app programatically, but I have to interact with the script to choose options
Describe the proposed solution
svelte-create should allow to specify options using command line parameters, like this:
Alternatives considered
can't think of any
Importance
would make my life easier
Additional Information
inspiration take from https://github.com/rossyman/svelte-add-jest#%EF%B8%8F-options
The text was updated successfully, but these errors were encountered: