Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/bfanger/svelte-project-template
An opinionated starter-template for SvelteKit projects
https://github.com/bfanger/svelte-project-template
eslint prettier stylelint svelte typescript
Last synced: 10 days ago
JSON representation
An opinionated starter-template for SvelteKit projects
- Host: GitHub
- URL: https://github.com/bfanger/svelte-project-template
- Owner: bfanger
- Created: 2021-02-14T13:49:50.000Z (over 3 years ago)
- Default Branch: main
- Last Pushed: 2024-10-12T16:11:51.000Z (26 days ago)
- Last Synced: 2024-10-19T01:22:57.494Z (19 days ago)
- Topics: eslint, prettier, stylelint, svelte, typescript
- Language: TypeScript
- Homepage:
- Size: 1.51 MB
- Stars: 5
- Watchers: 3
- Forks: 2
- Open Issues: 1
-
Metadata Files:
- Readme: Readme.md
Awesome Lists containing this project
README
# Svelte Project Template
[Svelte](https://svelte.dev/) project preconfigured with:
- [SvelteKit](https://kit.svelte.dev/) ([Vite](https://vitejs.dev/))
- [TypeScript](https://www.typescriptlang.org/)
- [Tailwind CSS](https://tailwindcss.com/), [PostCSS Preset Env](https://github.com/csstools/postcss-plugins/tree/main/plugin-packs/postcss-preset-env) ( which includes [Autoprefixer](https://github.com/postcss/autoprefixer))
- [Prettier](https://prettier.io/), [ESLint](https://eslint.org/) & [Stylelint](https://stylelint.io/)
- [Husky](https://typicode.github.io/husky/) & [Lint-staged](https://github.com/okonet/lint-staged)
- [Vitest](https://vitest.dev/) \*1
- [Playwright](https://playwright.dev/) \*1
- [Storybook](https://storybook.js.org/docs/svelte/writing-stories/introduction) \*1\*1: To keep the installation speedy Vitest, Playwright and Storybook are disabled by default.
## Initial setup
```sh
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
```## Enabling Testing & Storybook
```sh
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.## Linting
```sh
pnpm lint # or npm run lint
```I'd recommend enabling format-on-save in your editor, but to apply all auto fixes manually:
```sh
pnpm format # or npm run format
```## Build
```sh
pnpm build # or npm run build
npx serve@latest build # or npm run preview
```