0.5.0 • Published 4 years ago

wooster v0.5.0

Weekly downloads
2
License
MIT
Repository
github
Last release
4 years ago

npm npm mac ubuntu windows

wooster

error detection, context and makeup 🎀

Before

npm.io

After

npm.io

Easy to use

CLI with pipes

npm install -g wooster
npm run build 2>&1 | wooster

npm.io

As module

var wooster = require( 'wooster' )
var wp = wooster.parse( text )
if ( wp ) {
  console.log( wp.text ) // full wooster output message with context

  console.log( wp.context ) // only context
  console.log( wp.filename ) // filename
}
// grab context from text
var ctx = wooster.parseContext(
  {
    disableSourceMaps: false, // parse inline source maps by default
    prettify: true, // enable pretty/colored output
    text: fs.readFileSync( 'index.js', 'utf8' ),
    filename: 'index.js',
    lineno: 10,
    colno: 3
  }
)

About

Basic error log output parser.

Why

To easily see the source error and context.

How

By scoring each line, each url and each source position ( line and column ) in a variety of ways to determine if there is an error that could be parsed and then giving that error some context and giving it some makeup.

If no error is detected or parsing fails the input will be returned as output without changes.

Alternatives

pretty-error

Test

Tests against successful and error outputs from browserify, babelify, rollup, webpack, sass, less, stylus and some sample pm2 log error output.

npm test
0.5.0

4 years ago

0.4.0

4 years ago

0.3.9

4 years ago

0.3.8

6 years ago

0.3.7

6 years ago

0.3.6

6 years ago

0.3.5

6 years ago

0.3.4

6 years ago

0.3.3

6 years ago

0.3.2

6 years ago

0.2.0

6 years ago

0.1.2

7 years ago

0.1.1

7 years ago

0.1.0

7 years ago

0.0.11

7 years ago

0.0.9

7 years ago

0.0.8

7 years ago

0.0.7

7 years ago

0.0.6

7 years ago

0.0.5

7 years ago

0.0.4

7 years ago

0.0.2

7 years ago

0.0.1

7 years ago

0.0.0

7 years ago