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

biu

v0.2.23

Published

The command-line task hub.

Downloads

29

Readme

Biu: The Command-line Task Hub

Biu is a simple command-line tool for running multiple command-line tasks at the same time. It provides a simple GUI interface and aggregates stdout/stderr streams produced by tasks on demand.

image

Features

  • Start tasks in a group with one click.
  • Selectively pipe stdout and stderr of specific tasks.
  • Aggregate problems from several tasks with different problem matchers.

Installation

# global
yarn global add biu

# local
yarn add biu --dev

Usage

biu --help

Configuration

Biu loads configuration from a Node.js module, it could either be a .js or .json file. By default, it tries to require .biu, or read scripts section of package.json from the current working directory if no configuration file is specified and the default .biu (.js, .json) does not exist.

The configuration contains three fields: tasks (required), groups and problemMatchers.

Using built-in problem matchers

Currently Biu has the following built-in problem matchers:

  • $typescript:tsc-watch
  • $typescript:tslint
{
  "tasks": {
    "build-app": {
      "executable": "tsc",
      "args": ["-p", "src/app", "-w"],
      "problemMatcher": "$typescript:tsc-watch"
    },
    "build-server": {
      "executable": "tsc",
      "args": ["-p", "src/server", "-w"],
      "problemMatcher": "$typescript:tsc-watch"
    }
  },
  "groups": {
    "all": ["build-app", "build-server"]
  }
}

Using custom problem matchers

To use custom problem matchers, add it to the problemMatchers field:

{
  "tasks": {
    "build-app": {
      "executable": "tsc",
      "args": ["-p", "src/app", "-w"],
      "problemMatcher": "$typescript:tsc-watch"
    },
    "build-server": {
      "executable": "tsc",
      "args": ["-p", "src/server", "-w"],
      "problemMatcher": "$typescript:tsc-watch"
    },
    "build-website": {
      "executable": "webpack",
      "problemMatcher": "$typescript:at-loader"
    }
  },
  "groups": {
    "all": ["build-app", "build-server", "build-website"]
  },
  "problemMatchers": {
    "$typescript:at-loader": {
      "owner": "typescript",
      "pattern": [
        {
          "regexp": "^(ERROR) in \\[at-loader\\] (.+\\.ts):(\\d+|\\d+:\\d+)\\s*$",
          "severity": 1,
          "file": 2,
          "location": 3
        },
        {
          "regexp": "^\\s+(TS\\d+): (.+)$",
          "code": 1,
          "message": 2
        }
      ],
      "background": {
        "beginsPattern": "^\\[at-loader\\] Checking started in a separate process\\.\\.\\.$"
      }
    }
  }
}

Checkout config.ts for more options.

VSCode Problem Matcher Support

To make the aggregated problem matcher output work in VSCode, you'll need to define Biu as a task and configure proper problem matcher options in tasks.json:

{
  "version": "2.0.0",
  "tasks": [
    {
      "label": "biu",
      "type": "shell",
      "command": "yarn",
      "args": ["biu"],
      "isBackground": true,
      "group": {
        "kind": "build",
        "isDefault": true
      },
      "problemMatcher": {
        "name": "biu-typescript",
        "owner": "typescript",
        "applyTo": "closedDocuments",
        "fileLocation": "absolute",
        "pattern": {
          "regexp": "^\\[biu-problem:typescript:([^;]*);([^;]*);([^;]*);([^;]*);(.*?)\\]?$",
          "severity": 1,
          "file": 2,
          "location": 3,
          "code": 4,
          "message": 5
        },
        "background": {
          "activeOnStart": false,
          "beginsPattern": "^\\[biu-problems:typescript:begin\\]$",
          "endsPattern": "^\\[biu-problems:typescript:end\\]$"
        }
      }
    }
  ]
}

You can also install [Biu Problem Matchers] extension which contributes the following problem matchers:

  • $biu-typescript

Thus you will be able to simplify your task configuration.

{
  "version": "2.0.0",
  "tasks": [
    {
      "label": "biu",
      "type": "shell",
      "command": "yarn",
      "args": ["biu"],
      "isBackground": true,
      "group": {
        "kind": "build",
        "isDefault": true
      },
      "problemMatcher": "$biu-typescript"
    }
  ]
}

Support for package.json scripts

If configuration is loaded from package.json, Biu will convert all keys in scripts section into tasks. And if you add biuGroups, biu-groups or groups under biu section into your package.json, Biu will load it as groups.

License

MIT License.