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 🙏

© 2024 – Pkg Stats / Ryan Hefner

@novacat35/lit-web-components

v0.1.8

Published

A collection of web components built with Lit.dev

Downloads

1,124

Readme

Lit Web Components

The purpose of this project is two parts. First, it is a short demo of using Lit.dev to produce different web components. Second, it must be published on NPM so that any product team can install and use these components. 🚀

👉 NPM Package link

👉 Playground repo (to showcase the use of this package)

Tech Stack 🌐

  • Vite
  • Typescript
  • Lit.dev
  • Storybook

Instructions for using this NPM package 📙

Run the following to get started with using my package. To see how this would work in a product team, please see the playground repo link provided above.

npm i @novacat35/lit-web-components@latest



[!NOTE] Below are notes for the developer creating a new project to upload to NPM as a package.

Publishing to NPM 🛠️

Note the package.json changes & then run the following:

  1. npm run build
  2. npm login
  3. npm publish (or npm publish --access=public)

To update an NPM module that you published, change the version in your package.json or use npm version . After changing the version number in your package.json, you can run npm publish to publish the new version to NPM.

Folder Structure

/
├── .changeset/            # Changesets for versioning
├── .github/               # GitHub-specific configuration
├── dist/                  # Compiled and bundled application code (generated by Vite)
├── node_modules/          # Project-wide Node modules
├── src/                   # Main source folder
│   ├── custom-button.ts   # Custom button web component
│   ├── custom-form.ts     # Custom form web component
│   ├── index.ts           # Main entry point for the application's source code
│   └── vite-env.d.ts      # Vite environment type definitions
├── stories/               # Stories for testing and demo purposes
├── .gitignore             # Ignored files configuration for Git
├── index.html             # HTML template used by Vite
├── package-lock.json      # Lock file for npm dependencies
├── package.json           # Project package file
├── pnpm-lock.yaml         # Lock file for pnpm dependencies
├── README.md              # Project documentation (this file)
├── tsconfig.base.json     # Base TypeScript configuration file
├── tsconfig.json          # General TypeScript configuration file
└── vite.config.ts         # Vite configuration file


[!WARNING] The configuration steps below are incomplete and while it does not affect the main codebase, it simply doesn't work at the moment.

Manage Version Control & Changelogs (Changesets)

This project uses Changesets to manage version control and changelogs. Changesets is a CLI tool that helps us keep track of changes and generate a CHANGELOG.md file. Reference video start @ 1:25 STEPS: You can install pnpm with: npm install -g pnpm

  1. pnpm add -D @changesets/cli
  2. pnpm changeset init

Every time you make a change, you can add a changeset:

  1. pnpm changeset

Configuring Workflow (CI)

Reference video start @ 1:58

  1. See the .github/workflows -> files