Skip to content
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

flags for npm create svelte@latest #6765

Closed
pjebs opened this issue Sep 13, 2022 · 4 comments
Closed

flags for npm create svelte@latest #6765

pjebs opened this issue Sep 13, 2022 · 4 comments

Comments

@pjebs
Copy link

pjebs commented Sep 13, 2022

Describe the problem

Documentation: npm create svelte@latest asks 5 questions:'

  1. Template type
  2. TS support
  3. ESLint
  4. Prettier
  5. Playwright

I am trying to run the command from an application.
The documentation doesn't mention if there are CLI flags I can use to bypass human intervention questions.
-f and -y has been disabled.

Describe the proposed solution

Add flags to the create command.

Alternatives considered

No response

Importance

i cannot use SvelteKit without it

Additional Information

No response

@pjebs
Copy link
Author

pjebs commented Sep 13, 2022

If it's not possible to add flags to npm create svelte@latest, is there someother way I can obtain the template project (automated)? Perhaps a git repo somewhere for:

Template=skeleton
TS=yes
ESLint=yes
Prettier=yes
Playwrite=yes

?

@GrygrFlzr
Copy link
Member

Previous relevant issues: #1231, #2348, #2542

If we make this more programmatic, I'm concerned about that implying an API that we won't want to stick with. E.g., if we add a new question that someone hasn't yet added an option for in their script, is this a breaking change because running create-svelte now expects user input and won't just run automatically. (The alternative would be to make it explicitly fail if some but not all options were specified on the command line, which would also be a breaking change.) If this tool always requires human interaction, we don't need to worry about having an API because we can always assume a human is reading the interactive prompts.

@pjebs
Copy link
Author

pjebs commented Sep 13, 2022

Where is the project files located? Perhaps I can just clone it?

@pjebs
Copy link
Author

pjebs commented Sep 13, 2022

I guess this is what I was looking for: #2348 (comment)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants