npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

svelte-component-library-template

v0.0.3

Published

My Svelte Components

Readme

Build Status Dependabot

Svelte Components template

You can create your own component library to your applications with this template.

A base for building Svelte component library.

Original work is https://github.com/sveltejs/component-template

Using

On GitHub:

Use this template button on top right.

Read more: Creating a repository from a template

CLI:

  1. Clone it with degit
npx degit patoi/svelte-component-library-template svelte-component-library-template
cd svelte-component-library-template
npm install # or yarn
  1. Add your component's code to src/ as directory, e.g.: src/HelloComponent/ (or add your component directly to src/).

  2. Export the new component to apps in src/index.js

  3. src/test.js and src/App.svelte are for testing purposes:

  1. Create your test cases to your component:
  • add tests to test/ directory

Development

  1. npm install

  2. npm run dev :

  • build components on change and
  • serves from public/ directory at http://localhost:5000
  • and handling livereload
  1. npm test : test runner

For changing the view of the test page use public/global.css and public/index.html

Using components in app

https://github.com/rollup/rollup-plugin-svelte#pkgsvelte

Tip: if you are a developer of the component library, then you can install it once as devDependencies to app with npm i -D <path-to-your-components> , all change will appear immediately if you use livereload in app.

Import component library into your app in App.svelte :

<script>
  import { ByeBye, Hello } from 'svelte-component-library-template'
  export let name
</script>

<Hello {name} />
<ByeBye {name} />

Technical background

More: https://github.com/sveltejs/sapper-template/blob/master/README.md#using-external-components

  • svelte https://svelte.dev
  • playwright for testing: https://playwright.dev
  • eslint and prettier for formatting and linting
  • rollupjs for bundling: https://rollupjs.org

Supported Node.js v12 LTS and v14 LTS.