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

split-flap

v0.1.4

Published

Base project for building a Lit web component inside a Visual Studio Code development container

Downloads

24

Readme

LitElement Dev Container

When I work on a project, I like to work in a container. This repository serves as a template for developing LitElement web components in a Visual Studio Code developement container. These are my requirements:

  1. Create no local dependencies on my computer.
  2. Use TypeScript.
  3. Minimize the number of dependencies the codebase requires.
  4. Write tests to ensure things work as expected.

This template will create a project that runs in a container, uses LitElement to create a web component, Sass to style it, and Cypress to test it.

Get started

  1. Install Visual Studio Code
  2. Install Docker
  3. Open Visual Studio Code and install the Remote Development Extension
  4. Clone this repository, or create a new one from the template, and open it in Visual Studio Code
  5. Configure ports so they do not conflict with other things on your box:
    1. Set the webPort for noVNC and vncPort and forward them if you want to use them.
    2. Set the appPort where your app will run.
  6. Reopen the folder inside a dev container and open a terminal:
    1. Install dependencies: npm i
    2. Run it: npm run dev
    3. Test it: npm run test

Code intellisense, linting, and formatting

When multiple developers work on the same codebase, it is very easy to end up with inconsistent styling. This template is configured to use ESLint and Prettier to help ensure consistent styling and coding rules. It also has some extensions to help with intellisense and reason about the code. The following Visual Studio Code Extensions are installed in the container to help with that:

These plugins rely on the follow NPM packages:

Building the web component

To build the web component, run npm run build from a terminal. It uses rollup to package the code into a nice little bundle. The build relies on the following packages:

Other installed packages and why they are here

When building an application, it is important to limit dependencies and know why the ones in the project are there. Dependency hell is no fun. We've all been there. These are the other libraries in this starter template and why they are there: