https://github.com/beyonk-group/svelte-component-livereload-template
Svelte component template with LiveReload and Jest unit testing
https://github.com/beyonk-group/svelte-component-livereload-template
component continuous-delivery continuous-integration livereload seed starter svelte svelte-v3 tdd template unit-test unit-testing
Last synced: about 1 month ago
JSON representation
Svelte component template with LiveReload and Jest unit testing
- Host: GitHub
- URL: https://github.com/beyonk-group/svelte-component-livereload-template
- Owner: beyonk-group
- Archived: true
- Created: 2019-08-18T19:05:48.000Z (almost 6 years ago)
- Default Branch: master
- Last Pushed: 2020-03-18T18:15:18.000Z (over 5 years ago)
- Last Synced: 2025-03-23T17:01:47.138Z (3 months ago)
- Topics: component, continuous-delivery, continuous-integration, livereload, seed, starter, svelte, svelte-v3, tdd, template, unit-test, unit-testing
- Language: JavaScript
- Size: 11.7 KB
- Stars: 14
- Watchers: 2
- Forks: 4
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
![]()
# Svelte Component Template
by [@antony](https://github.com/antony)
[](http://standardjs.com) [](https://circleci.com/gh/beyonk-adventures/svelte-component-livereload-template) [](https://svelte.dev)
## Features
* Svelte 3
* Automatic NPM Publish support
* LiveReload
* Unit testing with @testing-library/svelte and Jest
* Fetch mocking for tests
* Eslint (@beyonk) / "Standard" Linting## Installation
npx degit [email protected]:beyonk-adventures/svelte-component-livereload-template.git
## Usage
Edit `src/Component.svelte`
`npm run dev`
## Building
`npm run build`
## Testing
Tests are in `test/*`. Edit files here, and run:
`npm run test`
## Publishing
You can set a component name in `package.json` and publish as usual with `npm publish`.
However, see the following section to make your life a lot easier.
## Continuous Deployment
You can set up CI/CD with CircleCI in two easy steps:
* Head to [CircleCI](https://www.circleci.com) and add this project.
* Add your NPM token as an environment variable called NPM_TOKEN in the org-global context.Whenever you commit to master, tests and linting will be run.
Whenever you tag and push to git, a npm release will automatically be made:
```bash
npm version
git push && git push --tags
```