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

create-light-project

v0.0.6

Published

CLI tool enables you to quickly start building a new Light.js application, with everything set up for you

Readme

Create light project

The easiest way to get started with Light.js is by using create-light-project. This CLI tool enables you to quickly start building a new Light.js application, with everything set up for you. To get started, use the following command:

Interactive

You can create a new project interactively by running:

npx create-light-project@latest

Who should use this framework ?

lightjs is a simple framework compared to React, Angular and other frameworks like that. There are a few things to keep in mind before you choose light. Let’s talk about when should you use light.

  • If you want to build a small web app and want to use node modules, follow a separated components project structure, and keep your app small in size.
  • If you know html css javascript and don’t want to learn frameworks or you want to get a little idea of how frontend frameworks work you should give lightjs a try.

Documentation

Light.js is a JavaScript framework for building user interfaces that comes with typescript and sass support out of the box. Go throught this documentation to have a better understanding. Hope you have already successfully created a light project using create-light-project cli tool so let's jump forward.

Creating components

Components in lightjs is a function that returns a template that can be appended to the dom. You can pass props as arguments of the function. A template is a html wrapped in string. You can also add separate styles for the component. Let's take an example of a Button component.

import "./styles.scss";

interface Props {
  text: string;
}

export const Button = ({ text }: Props) => {
  const template = `
      <button class=btn>${text}</button>
    `;
  return template;
};

Appending to dom

You can render components to the dom with the help of the append() function. Passing the component as an argument of the append function will render the component on the dom.

import { append } from "../framework/Core";
import { Button } from "./components/Button";

// getting the element
const btnEl = Button({ text: "Click Me!" });

// appending to the dom
append(btnEl);

Handling events

Events can be handled with the help of onEvent() function. It takes an id: string as the first param,event: string type as the second param and a handler function as the third param. Also only for click events there's a function onClick()

import { append, onClick, onEvent } from "../framework/Core";
import { Button } from "./components/Button";

// getting the element
const btnEl = Button({ text: "Click Me!" });

// appending to the dom
append(btnEl);

// handler functions
const handleClick = (e: PointerEvent) => {
  e.preventDefault();
  alert("clicked");
};

// attaching event listeners
onEvent("countBtn", "click", handleClick);
onClick("countBtn", handleClick);

Other functions

setText(id:string, text:string): changes the text value of an element

import { setText } from "../framework/Core";

const newText = "I am a Button";
setText("countBtn", newText);