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

simplekit

v1.0.1

Published

A very simple user interface toolkit for teaching UI architecture.

Downloads

81

Readme

🧰 SimpleKit

A very simple user interface toolkit for teaching UI architecture.

  • TypeScript and ES Modules only
  • Unbundled and uncompressed exports are original source to make it easy to "Go To Definition" and trace

Setup

There are three main ways to use SimpleKit.

1. Official npm package

The npm package is updated less frequently than the GitHub repo, but it's still a good way to use SimpleKit, especially if you already have a TypeScript build process.

Once you have a node project setup, just:

npm install simplekit

Notes on this approach:

  • Very easy to setup.
  • A bit less intuitive to navigate SimpleKit source code since its all in a deep node_modules/ subfolder.
  • You have to remember to update the package.
  • Easy to share the project with someone else, just grab the files and run npm install.

2. npm link

Clone the SimpleKit repo and install everything with npm install.

From the root folder of the SimpleKit repo, run:

npm link

This adds a simulated global npm package called "simplekit" (it's literally a symbolic link to the repo folder).

To use the linked package, run the following from your project:

npm link simplekit

Now it will behave as though an official npm package was installed.

Notes on this approach:

  • It's easier to look at the source code since you can open the SimpleKit repo in a separate VSCode directory.
  • If you change something in SimpleKit, sometimes VS Code loses track of the linked package types (imports have red squiggles with warnings the type is any). A workaround is to run "TypeScript: Restart TS Server" from the Command Palette.
  • You can't easily share your project since a linked global module won't appear in your package.json.

3. Git submodule

Add SimpleKit as a submodule to your project repo. This way it'll be in a known folder path relative to your project source, a good place to put it is in the root. So instead, of digging into node_modules/ you can just examine the simplekit folder of your project.

To import, you can just use a relative path like: import * from "../../simplekit/src/canvas-mode"

Or, even better, you can setup your build environment to have a path to the simplekit folder. For example in Vite:

  • << (Vite config setup TBD) explain how to setup paths in vite config and typescript config.>>

Git doesn't automatically init and update submodules automatically, so you'll need to do it on command line the first time you clone your main repo.

  • << git cloning instructions TBD >>