Istanbul: Can't run coverage with package.json script with local istanbul install

Created on 29 Jul 2014  路  1Comment  路  Source: gotwarlost/istanbul

I have installed istanbul with npm install istanbul

I can run using ./node_modules/istanbul/lib/cli.js cover app.js but when I add the following to my package.json

"cover": "node ./node_modules/istanbul/lib/cli.js cover app.js"

When I then run npm cover I get the following.

21:14:44 ~/Documents/CodeHatcher/Code/quippics$ npm cover

Usage: npm <command>

where <command> is one of:
    add-user, adduser, apihelp, author, bin, bugs, c, cache,
    completion, config, ddp, dedupe, deprecate, docs, edit,
    explore, faq, find, find-dupes, get, help, help-search,
    home, i, info, init, install, isntall, issues, la, link,
    list, ll, ln, login, ls, outdated, owner, pack, prefix,
    prune, publish, r, rb, rebuild, remove, repo, restart, rm,
    root, run-script, s, se, search, set, show, shrinkwrap,
    star, stars, start, stop, submodule, tag, test, tst, un,
    uninstall, unlink, unpublish, unstar, up, update, v,
    version, view, whoami

npm <cmd> -h     quick help on <cmd>
npm -l           display full usage info
npm faq          commonly asked questions
npm help <term>  search for help on <term>
npm help npm     involved overview

Specify configs in the ini-formatted file:
    /Users/avi/.npmrc
or on the command line via: npm <command> --key value
Config info can be viewed via: npm help config

[email protected] /usr/local/lib/node_modules/npm

How can I run my locally install istanbul using npm. I want it to be consistent with my test and build processes in the package.json.

Most helpful comment

npm run cover

>All comments

npm run cover

Was this page helpful?
0 / 5 - 0 ratings