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

sketch-kit

v1.6.0

Published

Rapid prototyping framework for HTML5/Javascript

Downloads

18

Readme

alt text

FOSSA Status

npm version

FOSSA Status

About The Project

Rapid prototyping framework for HTML5 projects

To help speed up the process of creating and running small experiments and prototypes I've developed some tools which I believe take much of the pain out of the experience.

The idea being; the more time one can spend on the fun bits (vs the boring dev-ops bits) the better and more expressive prototyping can be.

Sketch-Kit is designed to live along-side your project (a sketch-kit/ folder will exist in the project root), to provide a sand-box infrastructure where you can work through solutions. Sketch-Kit is ideal for :

  • Experimenting with js libraries used in your project code
  • Nuancing transitions (without having to navigate and potentially contaminate project code)
  • Sharing code examples with your team
  • Quick iteration on sketches
  • Not being bound to a safety-first developer mindset, encourage developers to have a little fun and be expressive!

Built With

alt text

Roadmap

  • [x] Migrate to vite for HMR and build tools

  • [ ] UI Improvements:

    • [x] Add fullscreen button
    • [ ] Add 'create sketch' button
  • [ ] Console Improvements:

    • [ ] Tagging via 'create' statement
  • [ ] Add support for dat.gui to allow for easy control of sketch parameters

  • [ ] Add support for three.js to allow for easy 3D prototyping

  • [ ] Add support for p5.js to allow for easy 2D prototyping

Setup

Each 'sketch' gets a javascript file and scss file generated on creation.

When the sketch is selected from the menu (top left, very discrete) the js for the sketch is imported and attached to a dom element on the page. This element is exposed as this.el.

Each sketch exposes a interface for commonly used methods, the most important being 'draw' :

    /**
     * All rendering should be placed here. Tick durations are clamped to 60fps
     * @param time : number
     * @param deltaTime : number
     */
    draw({time, deltaTime}) {
        //rendering goes here!
    }

CLI

Update

sketch-kit update

This is called by default by the following commands. Copies dependencies from package.json into the sketches folder.

Note; as of writing, most npm dependencies don't support es6 modules, to import deps into your sketch you'll most likely need to do something like the following to statically import them :

import '../../../node_modules/[library path]

Init

sketch-kit init

This command will add a 'sketches' folder to the root of your directory. Inside you'll find :

sketches/
--------/assets
--------/css
--------/data
--------/js
--------/--------/main.js
--------/--------/sketches.js
--------/--------/utils
--------/--------/views
--------/--------/--------/components
--------/--------/--------/sketches
--------/node_modules (optional)
--------/scss
--------/--------/sketches
--------/index.html
--------/sketch-kit.config.json

Options

  • Project Name. Name for the project (basically becomes the title for the rendered page).
  • Copy Node Dependencies. sketch-kit will automatically copy all dependencies from your project.json, making them available to your sketches (note: js modules only).

Run

sketch-kit run

sketch-kit will start up browser-sync and the watch tasks for your scss.

Create

sketch-kit create [sketch name] [copy name(optional)]

sketch-kit will add a new sketch to your sketches and wil now be available in the menu. This sketch includes the base sketch view template and a scss file with the sketch name being used as the css class reference.

If the sketch already exists, you'll be prompted to copy or replace, creating a new nested iteration.

Note; give sketches unique names to ensure that there aren't conflicts when copying. The replace method will search through the code and indescriminately replace the sketch name with whatever the next sketch name will be

Build

sketch-kit build

sketch-kit will create a build/ folder containing a static build of the project.

Global Options

~~configFile~~ NO LONGER SUPPORTED

Define an alternative config file for different distributions.

sketch-kit run --configFile alt.config.json

If the sketch already exists, you'll be prompted to copy or replace, creating a new nested iteration.

The base sketch-kit.config.json defines the sketches which are visible while running sketch-kit, and provides a target for adding new sketches.

License

FOSSA Status

Contact

Kevin May - @kev_mayo / email