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

@bigandy/houdini-circles-in-squares

v0.0.1

Published

A CSS Houdini worklet for Circles in Squares.

Downloads

2

Readme

11ty CSS Houdini Worklet Generator

From Stephanie Eckles @5t3ph - author of ModernCSS.dev and 11ty.Rocks.

This worklet was produced using Eleventy as the server environment.

Worklet Demo

The very simple worklet that is included in this generator can be viewed in this CodePen demo.

The demo shows how to include the required polyfill and then require the worklet within a script tag, and how to modify it's display attributes via CSS custom properties.

To Use the Generator

CSS Houdini worklets require a server to run. While there are many ways to create an envirnoment for developing and testing your worklet. As a static site generator, Eleventy provides a slim way to get setup and testing quickly so you can focus on creating your worklet!

Before you begin - be sure to update the package.json details to your own!

Project Structure

The following are all within src which is your working directory

_includes/base.njk - a simple HTML5 template that includes the (currently required) polyfill for the CSS Houdini Paint API, as well as the CSS.paintWorklet.addModule pointing to the worklet's location on the local server

css/style.css - the local server styles, this is where you add your worklet to your test elements

index.md - produces the index content, and can be swapped to another one of 11ty's supported templating languages

worklet.js - the critical file that creates and registers your worklet class

Development

npm start - will run the project locally by launching Eleventy in watch mode and include a localhost server with hot reload provided by Browsersync.

Publishing / Using Your Worklet

The recommendation from Houdini.How is to publish your worklet as an npm package so that it can be imported and used by accessing it on a CDN such as unpkg.

This is because of the requirement of running via HTTPS, so unpkg makes it easy to share and include elsewhere such as CodePen.

To publish via npm, you will first need to set up an account.

Then within your local project, run npm publish.

The included prepublish command will ensure Eleventy has been freshly run to ensure the latest version of your worklet is available.

Within a few minutes you will see your package added to your npm account, and then it will also be available at https://unpkg.com/your-package-name

Review the CodePen Demo to see how to then include it outside of your local project.

Updating Your Worklet

If you make changes to your worklet, use the included bump command to easily increment your package number, ex: npm run bump patch, then proceed to run npm publish.

Your changes will be available within a few minutes.