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

regal-cli

v1.2.0

Published

Command line interface for creating games with the Regal Framework

Downloads

4

Readme

regal-cli

npm version CircleCI Coverage Status code style: prettier

Command line interface for creating games with the Regal Framework

Installation

In most cases, the Regal CLI should be installed as a global dependency.

npm install -g regal-cli

The CLI peer depends on regal, so you'll have to install it if you haven't already.

npm install -g regal

Confirm that you've installed everything correctly:

regal

The program should display some information and list the available commands.

Usage

The Regal CLI automates several tasks related to making and playing Regal games.

Currently, the following commands are available:

Command | Description | Reference --- | --- | --- bundle [options] | create a Regal game bundle | Link play [options] <file> | play a standard Regal game bundle from the terminal | Link

bundle

The bundle command creates a Regal game bundle with regal-bundler.

Basic Usage

regal bundle

The bundler will attempt to load configuration values from regal.json or package.json. If no values are found, their defaults will be used. For more information, see the bundler documentation.

Options

To see a list of all options, run:

regal bundle --help

The following options are available for the bundle command:

Option | Description | Bundler Default* --- | --- | --- -c, --config <dir> | load configuration from a specific directory | process.cwd() -i, --input-file <file> | the root file of the game to bundle | src/index.ts --input-ts [boolean] | whether the source is TypeScript | true -o, --output-file <file> | game bundle output file | [GAME_NAME].regal.js -f, --format <type> | module format of the bundle: cjs, esm, or umd | cjs -m, --minify [boolean] | whether the bundle should be minified | false

*The default values will be used if no configuration values can be found in regal.json, package.json, or the CLI. If an option is specified in one of these configuration files, there is no need to specify it in the CLI command. The CLI options override everything else, so they are used to bundle games differently than specified in the configuration file.

Examples

Bundle the game as a minified UMD file:

regal bundle -f umd --minify

Load an alternate configuration from the test directory and save the bundle as ./test/game-test.regal.js:

regal bundle -c ./test -o ./test/game-test.regal.js

play

The play command plays a standard Regal game bundle from the terminal.

Basic Usage

regal play ./my-game.regal.js

Options

To see a list of all options, run:

regal play --help

The following options are available for the play command:

Option | Description | Game Default* --- | --- | --- --debug [boolean] | load the game bundle in debug mode | false --showMinor [boolean] | whether minor output should be shown | true --trackAgentChanges [boolean] | whether all changes to agent properties should be tracked | false --seed <string> | Optional string used to initialize psuedorandom number generation in each game instance | None

When one or more options are specified, a new game instance is generated with those game options. For more information, see the Regal Game Library's configuration docs.

*The default values will be used if no option overrides were specified in regal.json, package.json, or the CLI. If an option is specified in one of these configuration files, there is no need to specify it in the CLI command. The CLI options override everything else, so they are used to play games configured differently than they are specified in their configuration files.

Examples

Play a game in debug mode:

regal play ./bundle.regal.js --debug

Play a game that's seeded and doesn't show minor output:

regal play ./bundle.regal.js --showMinor false --seed hello