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

@tarwich/runner

v1.11.0

Published

Allow running of Parcel easier along with things like docker

Downloads

131

Readme

Running

Simply run npx runner to run your Parcel-based client/server project. For help, run npx runner --help. This example, uses npx, but if you don't have that, then you can add runner to a script in package.json, or run via ./node_modules/.bin/runner.

Add runner to package.json[scripts]

"scripts": {
  "runner": "runner"
}

Configuration

This system uses cosmiconfig to parse configuration files. You can add your own configuration by adding a runner key to your package.json, or by creating a .runnerrc.js file, or any other method that CosmiConfig supports.

File autodetection

Runner will attempt to autodetect client and server files for you. The order of precedence for these files is:

Client

  • src/client/index.html

  • src/client/index.htm

  • src/client/index.ts

  • src/client/index.js

  • client/index.html

  • client/index.htm

  • client/index.ts

  • client/index.js

  • src/server/index.ts

  • src/server/index.js

  • server/index.ts

  • server/index.js

Build Command

The build command will guess at configuration settings for client and server and build them. You can override this by setting the client or server entries in the config, or by adding an additional entry to sources in the config.

Configuration documentation:

{
  /** The path to additional command files */
  commandPath: string[];
  client: {
    /** The entry file for the client compilation */
    entry: string;
    /** The parcel configuration options */
    parcel: ParcelOptions;
  };
  /** Arguments to add when running the server */
  runArguments: string[];
  server: {
    /** The entry file for the server compilation */
    entry: string;
    /** True if this entry utilizes docker */
    docker: boolean;
    /** The parcel configuration options */
    parcel: ParcelOptions;
  };
  sources: {
    /** Name to display in any output related to this source (optional) */
    name: string;
    /** True if this entry utilizes docker */
    docker?: boolean;
    /** True if this item emits a runnable file */
    run?: boolean;
    /** The entry file for the server compilation */
    entry: string;
    /** The parcel configuration options */
    parcel: ParcelOptions;
  }[];
  /** Rules for linters */
  lint: {
    carets: {
      /**
       * How to handle dependencies
       * - strict: Must be a specific version such as 1.0.0
       * - range: Must be a range such as ^1.0.0
       * - ignore: Will not be checked
       */
      dependencies: DependencyType;
      /**
       * How to handle dependencies
       * - strict: Must be a specific version such as 1.0.0
       * - range: Must be a range such as ^1.0.0
       * - ignore: Will not be checked
       */
      devDependencies: DependencyType;
    };
    /** Array of additional linters to run. Should be paths to .js files */
    custom: string[];
    /** Configuration settings for prettier */
    prettier: {
      /**
       * Paths to run prettier on. You can use $EXTENSIONS in the path to add
       * all supported extensions, or you can add your own. This is an array of
       * glob expressions.
       */
      paths: string[];
    };
  };
}

Additional Commands

You can add your own commands to Runner by overriding runner.commandPath in your cosmiconfig, and adding .js files to that folder.

Example: Add commandPath to package.json[runner]

"runner": {
  "commandPath": "tools/commands"
}

Command Class

A command must export install and run. The install method accepts a Commander instance as the first parameter, which you can use to setup your command. The run method is used when other commands want to run your command directly. It should return a Promise so that other commands can await the result of your command.

Example

function run() {
  console.log('This is the command!');
  return Promise.resolve(true);
}

function install(program) {
  program
    .command('example')
    .description('An example command')
    .action(run);
}

module.exports = { install, run };