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

@narrat/bitsy-plugin

v1.0.2

Published

Narrat plugin to interface with a bitsy game

Readme

Narrat bitsy plugin

This plugin interfaces the narrat game engine with the bitsy game engine

Narrat bitsy plugin demo video

How it works

The plugin adds the show_bitsy and hide_bitsy narrat script functions to interface with bitsy.

There is an example index.html in the demo/public folder which contains a placeholder narrat game using the plugin. This file uses the standard bitsy setup but also adds a custom bitsy hack which adds a new instruction to bitsy: narrat.

Syntax: (narrat "narratLabel")

The custom bitsy narrat tag allows bitsy dialogue to trigger a narrat label. For example (as seen in the demo):

DLG 0
"""
Hello World.
Jumping to narrat label "bitsyTest":
(narrat "bitsyTest")
"""
NAME cat dialog

Enabling the plugin

Import and register the plugin before calling startApp in your game's index.ts (see src/index.ts in the demo for an example):

import { registerPlugin, startApp } from 'narrat';
import { BitsyPlugin } from './index'; // imports the bitsy plugin

window.addEventListener('load', () => {
  registerPlugin(new BitsyPlugin()); // Enables the bitsy plugin
  startApp(
    {
      charactersPath: 'data/characters.json',
      configPath: 'data/config.json',
    },
    {
      logging: false,
      debug: true,
    },
  );
});

Setting up with your own narrat game

Bitsy generally exports a single index.html file as its output. In this file there is:

  • An HTML skeleton
  • Some script tags with the engine
  • A script type containing the game's data

To make a narrat game work with Bitsy, the best way is to take the index.html file in the demo and simply replace the bitsy game data as desired. Bitsy hacks can also be added to the HTML file.

To set up an existing narrat game to work with Bitsy or if starting from scratch:

  1. Copy paste the necessary bitsy script tags in the <head> tag of the index.html file of the game. Those script tags can be found in the bitsy game download html file, or copy pasted from the example index.html provided in this repo.
  2. Add the narrat bitsy hack to the index.html file (this hack can be found in the demo index.html in this repo. It is the last script tag in the file, after the font.
  3. Add the script tag with the bitsy game data for the desired bitsy game that should run. The game data is the only part of the index.html code that needs to be modified when updating the bitsy game.

Using in narrat

Simply use show_bitsy or hide_bitsy in your game script:

main:
  "Hello world"
  show_bitsy

Running and deploying

Running the demo

Install dependencies:

npm install

Running:

npm start

Building the plugin

npm run build

Deployment

Update the plugin's version (the command will also build):

npm version [major | minor | patch]

Releasing on npm (can only be done by npm package owner):

npm publish