Everything you need to build a Svelte project, powered by sv.
If you're seeing this, you've probably already done this step. Congrats!
# create a new project
npx sv create my-app
To recreate this project with the same configuration:
# recreate this project
npx [email protected] create --template minimal --types ts --install npm .
Once you've created a project and installed dependencies with npm install (or pnpm install or yarn), start a development server:
npm run dev
# or start the server and open the app in a new browser tab
npm run dev -- --open
To create a production version of your app:
npm run build
You can preview the production build with npm run preview.
To deploy your app, you may need to install an adapter for your target environment.
cd "C:\Users\guigo\Projet Web\my-components" npm run package npm version patch git push origin main --tags
cd "C:\Users\guigo\Projet Web\test_project_my_component\crevettes-shop" npm install github:GuillaumeGiordano/my-components
▎ Le npm version patch fait deux choses en une : il bumpe la version dans package.json et crée le git tag ▎ automatiquement. Le git push --tags pousse les deux (commit + tag).
Si tu n'as pas besoin de versionner à chaque itération (phase de dev active), tu peux simplifier à :
pnpm run package && git add -A && git commit -m "maj" && git push
npm install github:GuillaumeGiordano/my-components
Le workflow mis en place
Pour la suite, si tu modifies un composant dans my-components :
npm run package git add -A && git commit -m "..." && git push
pnpm install github:GuillaumeGiordano/my-components git add pnpm-lock.yaml && git commit -m "chore: update @guillaumeg/ui" && git push Vercel redéploie automatiquement dès que tu pushes sur main.