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

webpack-runner

v3.1.1

Published

Webpack build wrapper with formatted and normalized error output

Downloads

767

Readme

Build Status npm version

Introduction

Webpack runner is a simple CLI tool that acts as a webpack build wrapper. It produces machine-readable output, that can easily be parsed and interpreted by an IDE, such as VSCode. The goal is to have all webpack errors or warnings integrated with the IDE, without having to switch back and forth between the IDE and the terminal.

Installation

npm install -g webpack-runner

Usage

For full documentation, run the following command from CLI:

webpack-runner -h

Example Usage

webpack-runner --config=/path/to/webpack.config.js --watch

Configuring VSCode to parse webpack-runner output

Example tasks.json:

// A task runner that calls webpack runner in continuous watch mode
{
    "version": "0.1.0",

    "command": "./node_modules/.bin/webpack-runner",

    // The command is a shell script
    "isShellCommand": true,

    "tasks": [
        {
            "taskName": "build",
            "suppressTaskName": true,
            "showOutput": "silent",
            "isBuildCommand": true,
            "isWatching": true,
            "args": [
                "--watch",
                "--config=${workspaceRoot}/webpack.config.js"
            ],
            // use the standard tsc problem matcher to find compile problems
            // in the output.
            "problemMatcher": {
                // The problem is owned by the typescript language service. Ensure that the problems
                // are merged with problems produced by Visual Studio's language service.
                "owner": "typescript",
                // The file name for reported problems is relative to the current working directory.
                //"fileLocation": ["relative", "${cwd}"],
                "fileLocation": "absolute",
                // A regular expression signalling that a watched task begins executing (usually triggered through file watching).
                "watchedTaskBeginsRegExp": "^Build started\\.$",
                // A regular expression signalling that a watched tasks ends executing.
                "watchedTaskEndsRegExp": "^Build finished\\. \\(\\d+ms\\)$",
                // The actual pattern to match problems in the output.
                "pattern": {
                    // The regular expression. Matches HelloWorld.ts(2,10): error TS2339: Property 'logg' does not exist on type 'Console'.
                    "regexp": "^([^\\s].*)\\((\\d+|\\d+,\\d+|\\d+,\\d+,\\d+,\\d+)\\):\\s+(error|warning|info)\\s+([A-Za-z0-9-_]+)\\s*:\\s*(.*)$",
                    // The match group that denotes the file containing the problem.
                    "file": 1,
                    // The match group that denotes the problem location.
                    "location": 2,
                    // The match group that denotes the problem's severity. Can be omitted.
                    "severity": 3,
                    // The match group that denotes the problem code. Can be omitted.
                    "code": 4,
                    // The match group that denotes the problem's message.
                    "message": 5
                }
            }
        }
    ]
}

Limitations

Webpack runner currently understands only the standard webpack errors and errors produced by ts-loader.