Svelte project preconfigured with:
- SvelteKit (Vite)
- TypeScript
- Tailwind CSS, PostCSS Preset Env ( which includes Autoprefixer)
- Prettier, ESLint & Stylelint
- Husky & Lint-staged
- Vitest *1
- Playwright *1
- Storybook *1
*1: To keep the installation speedy Vitest, Playwright and Storybook are disabled by default.
npx tiged "github.com/bfanger/svelte-project-template#main" my-svelte-project
cd my-svelte-project
git init --initial-branch main
git add .
pnpm install # or npm install
cp -n env.example .env
pnpm dev --open # or npm run dev -- --open
node ./enable-testing.js
pnpm install # or npm install
- Creates the configuration files
- Creates an example unittest
- Creates an example e2e test
- Creates an example storybook story
- node_modules grows from ~166M to ~288M.
pnpm lint # or npm run lint
I'd recommend enabling format-on-save in your editor, but to apply all auto fixes manually:
pnpm format # or npm run format
pnpm build # or npm run build
npx serve@latest build # or npm run preview