Code Monkey home page Code Monkey logo

svelte-component-template's Introduction

@svelte-plugins/svelte-component-template

A Svelte seed project for creating components.

TLDR;

> npm i

> npx husky install

> chmod +x .husky/post-merge && chmod +x .husky/pre-commit && cp .husky/post-merge .git/hooks

> npm start

Setting up development environment

  1. Install dependencies

    > npm i
  2. Install husky hooks

    > npx husky install
  3. 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
  4. Start the component dev server and the document server

    > npm start
  5. Happy coding! You're changes will be automatically rebuilt and reflected immediately on the docs.

Testing

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

Documentation

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

Publishing Package

You can publish your package via NPM:

  1. Adjust the major, minor or patch version in the version property of your package.json.
  2. Login or create an NPM account.
  3. Run npm run publish

If you are looking for a private publish or other types, follow the guide here.

Stack

Framework

  • Svelte - Blazing fast frontend framework that enhances HTML, CSS & JS

Testing

  • Vitest - Next Generation Testing Framework

CI/CD

  • GitHub Actions - Automate, customize, and execute workflows in your repository with GitHub Actions.

Development

  • Vite - Next Generation Frontend Tooling
  • Babel - JavaScript compiler that allows next generation JS, today
  • Prettier - An opinionated code formatter
  • Publint - Lint packaging errors. Ensure compatibility across environments.
  • ESLint - A static code analysis tool for finding issues in your code
  • Husky - Hooks for running linting, formatting, etc when you push or commit
  • Lint-staged - Run linters on git staged files

Publishing

  • NPM - Run linters on git staged files
  • Svelte Package - The fastest way to build Svelte packages

Changelog

Changelog

License

MIT

svelte-component-template's People

Contributors

dysfunc avatar

Stargazers

 avatar  avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.