A Svelte seed project for creating components.
> npm i
> npx husky install
> chmod +x .husky/post-merge && chmod +x .husky/pre-commit && cp .husky/post-merge .git/hooks
> npm start
Install dependencies
> npm i
Install husky
hooks
> npx husky install
Make sure husky scripts are executable and copied to .git/hooks
> chmod +x .husky/post-merge && chmod +x .husky/pre-commit && cp .husky/post-merge .git/hooks
Start the component dev server and the document server
> npm start
Happy coding! You're changes will be automatically rebuilt and reflected immediately on the docs.
Running either of these commands will execute all unit tests.
Command | Notes |
---|---|
npm test |
Single run with no coverage report |
npm test:watch |
Watches for changes |
npm test:coverage |
Executes tests and launches a coverage report |
Run all tests
> npm test
Run a specific test
> npm test [path-to-test-file]
Run all tests and generate a code coverage report
> npm test:coverage
Building
Run the build:docs
command to generate a dist bundle for GitHub pages.
> npm run build:docs
Deploying
Run the deploy:docs
command to automaically build the docs source and push it to gh-pages
.
> npm run deploy:docs
You can publish your package via NPM
:
version
property of your package.json
.NPM
account.npm run publish
If you are looking for a private publish or other types, follow the guide here.