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

@nritschel/sketch-tool-pl

v1.1.1

Published

A configurable JavaScript front-end drawing tool with plugin components - adapted for use in PrairieLearn

Readme

Sketch Tool

A configurable Javascript front-end drawing tool with plugin components.

This version of SketchResponse has been updated to be compatible with more recent versions of its dependencies and WebPack. It has also been modified for compatibility with the PrairieLearn platform, for example by supporting more than one SketchResponse canvas on the same web page and adding support for new customizations.

Only the Sketch Tool itself has been updated, as all remaining contents of the repository (e.g., grading libraries) were re-written and replaced with PrairieLearn-specific grading mechanisms. These re-written graders are not stored in this repository, but will be published separately, as part of an open-source element for PrairieLearn.

Prerequisites

You'll need to have Node.js and npm (which is now packaged with Node) to be installed on your system.

Installation

  • Change to the sketch_tool directory:

    $ cd sketchresponse/sketch_tool
  • Install dependencies listed in package.json:

    $ npm ci

Usage

  • Change to the sketch_tool directory:

    $ cd sketchresponse/sketch_tool
  • To start the development server:

    $ npm run start --debug=allPlugins

    This will automatically open your default browser and load the tool with options listed in the allPlugins object located in debugConfigs.js.

    Options are:

    • width, height: dimensions of the tool.
    • xrange, yrange: dimension of the drawing canvas.
    • xscale, yscale: linear or logarithmic scales. Only linear is supported for the moment.
    • coordinates: cartesian or polar.
    • plugins: modules that extend drawing functionality either automatically (for example axes and image) or are placed in the top toolbar (freeform, horizontal and vertical lines) and let the user draw the corresponding shape on the canvas.

    You can also load these additional configurations which show various features of the tool:

    • allPluginsLatex
    • initialState
    • axesParams
    • tagPosition
    • newPlugins
    • invalidConfig
    • pluginGroup
  • To use ESLint on the JS code located in sketch_tool/lib:

    $ npm run lint:js
  • To use StyleLint on the SCSS (or CSS) code located in sketch_tool/styles:

    $ npm run lint:css
  • To build the sketchresponse/static/sketch_tool_dist directory:

    $ npm run build

    You can change the target browsers of the build by modifying the BrowserList entry in package.json. Currently the target is set to the last 2 versions of every major browser excluding IE.

Plugins

They are located in the following directory.

  • axes: Adds horizontal and vertical axes with major and minor ticks and their associated gridlines. Params: xmajor (major x tick spacing, default value: 1), ymajor (major x tick spacing, default value: 1), xminor (minor x tick spacing, default value: 0.25), yminor (minor y tick spacing, default value: 0.25).

  • background: Sets a backgound image for the drawing canvas.

  • freeform: Adds a button to the toolbar that lets user draw a spline. Params: label (label of button), color (color of drawn spline).

  • horizontal-line & vertical-line: Adds a button to the toolbar that lets user draw a horizontal/vertical line. Params: label (label of button), color (color of line), dashStyle (possible values: 'dashed', 'longdashed', 'dotted', 'dashdotted', 'solid' (default value)).

  • image: Adds an image to the drawing canvas. Params: scale (default value 1), align (possible values, 'top', 'left', 'bottom', 'right', '' (default value)), offset (array of x, y offsets (default value[0, 0])).

  • point: Add a button to the toolbar that lets user draw a point. Params: label (label of button), color (color of drawn point), size (radius of point in pixels).

Main dev dependencies

NPM modules (see package.json)

License

Please refer to the LICENSE file in the root of the SketchResponse repository.