Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/spaceavocado/svelte-router-template
Boilerplate template project for spaceavocado/svelte-router - Simple Svelte Router for Single Page Applications (SPA).
https://github.com/spaceavocado/svelte-router-template
router svelte svelte-router svelte3 template
Last synced: 3 months ago
JSON representation
Boilerplate template project for spaceavocado/svelte-router - Simple Svelte Router for Single Page Applications (SPA).
- Host: GitHub
- URL: https://github.com/spaceavocado/svelte-router-template
- Owner: spaceavocado
- License: mit
- Created: 2019-08-08T14:51:49.000Z (over 5 years ago)
- Default Branch: master
- Last Pushed: 2019-10-22T00:26:26.000Z (about 5 years ago)
- Last Synced: 2024-09-29T12:02:20.428Z (3 months ago)
- Topics: router, svelte, svelte-router, svelte3, template
- Language: HTML
- Size: 1.13 MB
- Stars: 12
- Watchers: 2
- Forks: 2
- Open Issues: 1
-
Metadata Files:
- Readme: readme.md
- License: LICENSE.txt
Awesome Lists containing this project
README
# Svelte Router Template
Boilerplate template project for [spaceavocado/svelte-router](https://github.com/spaceavocado/svelte-router) - Simple Svelte Router for Single Page Applications (SPA).
## Live Preview
[https://spaceavocado.github.io/svelte-router-template/](https://spaceavocado.github.io/svelte-router-template/)## Setup
1. Clone this repository or [create your repository from this template](https://help.github.com/en/articles/creating-a-repository-from-a-template).
2. Install packages:
```npm install ``` or ```yarn install ```## Essential Information
- [Webpack](https://webpack.js.org/) based project.
- JS transpiled with [Babel](https://babeljs.io/).
- SCSS for Svelte integrated with [Svelte Preprocess](https://github.com/kaisermann/svelte-preprocess), please see [svelte.config.js](https://github.com/spaceavocado/svelte-router-template/blob/master/svelte.config.js) for integration details.
- [Pug](https://pugjs.org/) for Svelte integrated with [Svelte Preprocess](https://github.com/kaisermann/svelte-preprocess), please see the [Svelte Pug syntax limitations](https://github.com/kaisermann/svelte-preprocess#pug).
- The template is set to use the Svelte Router HTML5 history mode, to switch it to HASH mode, please see the [Router Options](https://github.com/spaceavocado/svelte-router#router-options).
```javascript
createRouter({
mode: ROUTER_MODE.HASH,
});
```## Local Development Server
To run the development server that provides live reloading, run:
```npm run start``` or ```yarn start```## Production Build
```npm run build:prod``` or ```yarn build:prod```> Note: If hosted in a sub-folder, e.g. domain.com/project/, please update the **baseURL** in:
> * webpack.config.js
> * package.jsonThe productions files are located in **/publish** folder:
- index.html
- dist
- assets## License
Svelte Router is released under the MIT license. See [LICENSE.txt](https://github.com/spaceavocado/svelte-router-template/blob/master/LICENSE.txt).