phaz

0.1.2 • Public • Published

phaz Build Status

Verifies that all your package.json files contain expected attributes.

I was in the need of a simple tool for checking if all my package.json files have a defined set of attributes. So the requirement was that the tool should be über-simple (without using json schema validators etc.). phaz, is the result :)

Installation

Install with npm globally.

npm i -g phaz

Usage examples

Let's say you want to check all your package.json files:

cd projects
phaz bugs repository

Output (is colored):

deflector
lingua (missing: bugs)
express-slicer
filepad (missing: bugs)
fuchur (missing: bugs)
gulp-imacss
gulp-image2cssref
gulp-npm
gulp-picturizer
gulp-svg2png
imacss
markdown2pdf (missing: bugs)
ninit
phaz (missing: bugs)
...

Will check all package.json files within all subdirectories of the current working directory.

You can check a single package.json file as well.

phaz projects/myproject/package.json name author license

API

If you want to use this thingy in one of your projects, install it as a dependency:

npm i --save phaz

And use it like

var fs = require('fs'),
    p  = require('phaz'),
    strom;
 
strom = fs.createReadStream('/path/to/a/package.json')
    .pipe(p.haz(['repository', 'engine']))
    .pipe(process.stdout);
 
strom.on('error', function onError (err) {
    return console.error('Autsch! %s', err);
});

p.haz([attributes])

attributes

Type: Array

Default: []

The attributes that should be checked.

Changelog

Version 0.1.2 (20140315)

  • Changed example in README.

Version 0.1.1 (20140315)

  • Minor README extensions / fixes.

Version 0.1.0 (20140315)

  • Initial version. Implemented stream and CLI.

Author

2014, André König (andre.koenig@posteo.de)

Readme

Keywords

none

Package Sidebar

Install

npm i phaz

Weekly Downloads

2

Version

0.1.2

License

none

Last publish

Collaborators

  • akoenig