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

@cyclist/runner

v0.7.0

Published

Orchestrator for package build lifecycles

Downloads

5

Readme

@cyclist/runner

A CLI tool to orchestrate build steps for your project. Cyclist runs scripts listed in your package.json in order based on lifecycles that you configure.

Installation

npm install -g @cyclist/runner
# or if using yarn
yarn global add @cyclist/runner

Usage

You can list all available lifecycles for a project by running

cyclist --list

Running a lifecycle is done in the terminal:

cyclist <lifecycle name> [stage name]

Cyclist will run stages in the given lifecycle in sequence, in a manner similar to npm run. The stage name argument is optional and will cause Cyclist to only run stages up to and including the one provided.

Configuration

Configuration for Cyclist can be added to the following places:

  • a cyclist field in your package.json
  • .cyclistrc.json, .cyclistrc.yml, or .cyclistrc.yaml files
  • exported as a module in a cyclist.config.js file

The main component of the config is the lifecycles property which is read by the CLI to find all the available lifecycles. e.g.

{
  "lifecycles": {
    "dev": ["build", "start"],
    "verify": ["lint", "build", "test"]
  }
}

Each lifecycle contains the following:

stages

An array of stages. A stage can either be a string name or an object with the following properties:

  • name The name of the stage that can be referenced using the CLI
  • tasks (optional) An array of tasks to run in this stage. Defaults to [<name>]
  • parallel (optional) Whether all the tasks in this stage should be run in parallel to each other. Defaults to false
  • outputMode (optional) Sets the default outputMode on tasks in this stage. Can be one of the following:
    • stream Stream output from tasks directly to the console. Default
    • batch Wait for a task to complete before sending all its output to the console.
    • ignore Don't display any console output.

tasks

An array of tasks to be run for a stage. A task can either be a string corresponding to script to run or an object with the following properties:

  • script The script to run. This must correspond to the name of a script in the package being worked upon
  • outputMode (optional) How stdio output from this task should be handled. Can be one of the following:
    • stream Stream task output directly to the console.
    • batch Wait for a task to complete before sending all its output to the console.
    • ignore Don't display any console output.

Example configs

Parallel tasks

Run your lint and test jobs in parallel before building a dist

{
  "lifecycles": {
    "build-dist": [
      {
        "name": "validate",
        "tasks": ["lint", "test"],
        "parallel": true
      },
      "build"
    ]
  }
}