Skip to content

RunTimeAU/RunTimeWeb

Repository files navigation

sv

Everything you need to build a Svelte project, powered by sv.

Creating a project

If you're seeing this, you've probably already done this step. Congrats!

# create a new project in the current directory
npx sv create

# create a new project in my-app
npx sv create my-app

Developing

Once you've created a project and installed dependencies with npm install (or pnpm install or yarn), start a development server:

NODE_ENV=development npm run dev

# or start the server and open the app in a new browser tab
NODE_ENV=development npm run dev -- --open

Building

To create a production version of your app:

NODE_ENV=development npm run build

You can preview the production build with NODE_ENV=development npm run preview.

To deploy your app, you may need to install an adapter for your target environment.

Publish SvelteKit project on GitHub Pages

Install @sveltejs/adapter-static and gh-pages.

npm i -D @sveltejs/adapter-static gh-pages

Update svelte.config.js by changing adapter-auto to adaptor-static.

import adapter from '@sveltejs/adapter-static';

+layout.js

Add the following to src/routes/+layout.js

export const prerender = true;

Add a script to package.json.

"gh-pages": "npm run build && npx gh-pages -d build"

Deploy

Now you just need to run npm run gh-pages.

.nojekyll file for Tailwind CSS/Postcss

If you are using a postcss such as Tailwind css, you need to add an empty .nojekyll file to the gh-pages branch.

About

Website for the run club RunTime

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 2

  •  
  •