Everything you need to build a Svelte project, powered by create-svelte
.
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.
If you want to add a new feature (Such as a svelte component, a simple function, or anything), create a new branch first like this:
git branch feature-name
For example, if you want to create the navbar component, do:
# create a new branch
git branch navbar
# switch to that branch
git checkout navbar
Or:
# create & switch to new branch
git switch -C feature-name
Then after finishing working on the feature, push the branch to Github using:
git push origin feature-name
So the leader can modify it and apply necessary changes before adding it to the main
branch.
NOTE: Do NOT modify branches other than the ones you create to avoid. Do NOT edit branches created by other developers.
-
Run reguraly the command
git fetch origin
to stay up-to-date with what features others have been working on. -
Components' files' names MUST be created at directory
src/lib/components
withPascalCase
(Basically, capitalize each word of the component's name) (e.g.,MySpecialComponent.svelte
). -
As long as you are on a branch created by you, you are free to edit any file/folder since it won't affect other branches or the whole project.