-
-
Notifications
You must be signed in to change notification settings - Fork 52
Closed as not planned
Labels
Description
It is currently impossible to include add-ons without interactive user input.
pnpm dlx sv create --template minimal --types ts --no-install ts
# ┌ Welcome to the Svelte CLI! (v0.6.5)
# │
# ◆ Project created
# │
# ◆ What would you like to add to your project? (use arrow keys / space bar)
# │ ◻ prettier (formatter - https://prettier.io)
# │ ◻ eslint
# │ ◻ vitest
# │ ◻ playwright
# │ ◻ tailwindcss
# │ ◻ drizzle
# │ ◻ lucia
# │ ◻ mdsvex
# │ ◻ paraglide
# │ ◻ storybook
# └
create-svelte
provided API, so the following was possible:
/** @param {'checkjs' | 'typescript'} type */
const generateOptions = (type) =>
/** @type {const} */ ({
types: type,
name: `svelte-kit-${type}`,
template: 'skeleton', // or 'default' or 'skeletonlib'
prettier: true,
eslint: true,
playwright: false,
vitest: false,
});
https://github.com/hyunbinseo/svelte-kit-templates/blob/v6.4.0/index.js#L4-L14
Workaround
pnpm dlx sv create --template minimal --types ts --no-install --no-add-ons ts
pnpm dlx sv add --no-install --cwd ts eslint prettier