UNPKG

567 BJavaScriptView Raw
1#!/usr/bin/env node
2var NYC = require('../'),
3 argv = require('yargs')
4 .usage('$0 [options]')
5 .option('d', {
6 alias: 'cwd',
7 default: process.cwd(),
8 describe: 'root directory that contains the nyc_output folder'
9 })
10 .option('r', {
11 alias: 'reporter',
12 describe: 'coverage reporter to use',
13 default: 'text'
14 })
15 .help('h')
16 .alias('h', 'help')
17 .epilog('github.com/gotwarlost/istanbul for available reporters')
18 .argv
19
20process.env.NYC_CWD = argv['cwd']
21
22;(new NYC({
23 reporter: argv.reporter
24})).report()