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

ink-session

v1.2.0

Published

Ink Session is a webserver that provides a runtime for the [ink](https://github.com/inkle/ink/) language via a http interface.

Downloads

4

Readme

Ink Session

Ink Session is a webserver that provides a runtime for the ink language via a http interface.

It is mostly based off of inkjs extending the Story class with methods to use in an asynchronous methods

Instead of getting content with the Continue method the getLine method allows the client to get content at it's own pace and automatically get new content.

An example client is provided as a html page with the ink-client.js script added which updates the client whenever new content is added and keeps the selection of story choices up to date.

Setup

The server requires the node runtime to run.

Dependencies can be installed by running:

npm install

Edit the configuration file config/default.yaml, or write a new one with name config/<hostname>.extension, and update the story_path field with the path to an ink file. Then set the save_path fields to the desired path to save the story state and the log.

Changing the routes will require the updating client's route table as well.

Then you can run the server with the command:

node ink-session.js

It will then print the URL used to access the server. Going to that link will load the example page in the public directory.

Turns

Implements methods to handle turn, so that all clients to just share control at the same time.

The turn is defined in the ink file itself, with a tag with the format: turn: name Where name indicates who can make a choice selection.

Each client is assigned a name from a global cast variable, named cast, which is a ink list type with the name of each cast member.

The name for the turn tag and cast variable can be set in the config file.

Example

LIST cast = Alice, Bob
Enter Alice and Bob

# turn: Alice
Alice had a pair of <>
* red
* blue
- <> boots.

# turn: Bob
And Bob had a <>
* small
* big
- <> hat.