This is a project template for Svelte apps. It lives at https://github.com/ehedenst/svelte-template.
To create a new project based on this template using degit:
npx degit ehedenst/svelte-template svelte-app
cd svelte-appNote that you will need to have Node.js installed.
Install the dependencies...
cd svelte-app
yarn...then start Rollup:
yarn serveNavigate to 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 serve plugin in rollup.config.js and set the host to '0.0.0.0'.
To create an optimised version of the app:
yarn buildWith now
Install now if you haven't already:
yarn global add nowThen, from within your project folder:
cd public
now deploy --name my-projectAs an alternative, use the Now desktop client and simply drag the unzipped project folder to the taskbar icon.
With surge
Install surge if you haven't already:
yarn global add surgeThen, from within your project folder:
npm run build
surge public my-project.surge.sh