An open API service indexing awesome lists of open source software.

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

Awesome Lists containing this project

README

        


Beyonk

# Svelte Component Template

by [@antony](https://github.com/antony)

[![js-standard-style](https://img.shields.io/badge/code%20style-standard-brightgreen.svg)](http://standardjs.com) [![CircleCI](https://circleci.com/gh/beyonk-adventures/svelte-component-livereload-template.svg?style=shield)](https://circleci.com/gh/beyonk-adventures/svelte-component-livereload-template) [![svelte-v3](https://img.shields.io/badge/svelte-v3-blueviolet.svg)](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
```