generator-svalter
Version:
Generator to help you create and manage svelte/sapper application
41 lines (24 loc) • 956 B
Markdown
*Looking for a shareable component template? Go here --> [sveltejs/component-template](https://github.com/sveltejs/component-template)*
---
# svelte app
*Note that you will need to have [Node.js](https://nodejs.org) installed.*
## Get started
Install the dependencies...
```bash
cd <%= package_name %>
npm install
```
## Testing the component
You need to link your project to be able to use it in a local project (or distribute it on npm)
```
npm link
cd examples
npm link <%= package_name %>
npm install
```
...then start [Rollup](https://rollupjs.org):
```bash
npm run dev
```
Navigate to [localhost:5000](http://localhost:5000). You should see your app running. Edit a component file in `src`, save it, and reload the page to see your changes.
By default, the server will only respond to requests from localhost. To allow connections from other computers, edit the `sirv` commands in package.json to include the option `--host 0.0.0.0`.