This is a project template modified from original Svelte template to work with PHP as a developemnt server.
To create a new project based on this template using degit:
npx degit kitinon/svelte-php-template my-app
cd my-app
Note that you will need to have Node.js and PHP installed.
Install the dependencies...
cd my-app
npm install
...then start Rollup:
npm run dev
Navigate 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.
The content of /public folder can be installed to a web server that support PHP i.e. nginx, apache http server, etc.
This template differs from the original one that it generates HTML Custom Elements. To generate a 'normal' svelte component, you can remove 'customElement' parameter from svelte plugin in rollup.config.js file or simply set it to false.