Skip to content

Commit cdf4965

Browse files
committed
1.0.0
- removes react dependencies - inlines assets
1 parent 49f8fc1 commit cdf4965

37 files changed

+1337
-9993
lines changed

.eslintrc

-29
This file was deleted.

.storybook/config.js

-11
This file was deleted.

.storybook/webpack.config.js

-27
This file was deleted.

.tryitout

-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@ module.exports = {
22
title: 'tap-html',
33
nav: {
44
Source: 'https://github.com/gabrielcsapo/tap-html',
5-
Storybook: './storybook/index.html',
65
Example: './example/index.html'
76
},
87
body: `

CHANGELOG.md

+5
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,8 @@
1+
# 1.0.0 (04/20/2019)
2+
3+
- removes react dependencies
4+
- inlines assets
5+
16
# 0.3.0 (03/04/2019)
27

38
- fixes issue with plan not checking for plan name to be a string and instead uses range

TODO.md

-2
This file was deleted.

bin/index.js

+15-11
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,13 @@
11
#!/usr/bin/env node
22

3+
const fs = require('fs');
34
const path = require('path');
5+
const { promisify } = require('util');
6+
7+
const writeFile = promisify(fs.writeFile);
8+
49
const parser = require('../');
5-
const generate = require('../lib/generate');
10+
const { generate } = require('../lib/generate');
611

712
let program = {};
813
const args = process.argv.slice(2);
@@ -14,7 +19,7 @@ args.forEach((arg, i) => {
1419
case 'version':
1520
console.log(`v${require('../package.json').version}`); // eslint-disable-line
1621
process.exit(0);
17-
break;
22+
break;
1823
case '-h':
1924
case '--help':
2025
case 'help':
@@ -30,24 +35,23 @@ Options:
3035
-o, --outFile [path] If instead of piping content you want it to be written to an html file locally please specify the relative path
3136
`);
3237
process.exit(0);
33-
break;
38+
break;
3439
case '-o':
3540
case '--out':
3641
program['out'] = path.resolve(process.cwd(), args[i + 1]);
37-
break;
42+
break;
3843
}
3944
});
4045

4146
const { out } = program;
4247

4348
process.stdin
44-
.pipe(parser((res) => {
49+
.pipe(parser(async (res) => {
50+
const outputPath = out ? path.resolve(__dirname, out) : path.resolve(process.cwd(), 'tap.html');
51+
4552
// generate the html report
46-
if(out) {
47-
// write the output to the specified location
48-
generate(res, out);
49-
} else {
50-
generate(res);
51-
}
53+
const output = await generate(res);
54+
55+
await writeFile(outputPath, output);
5256
}))
5357
.pipe(process.stdout);
Binary file not shown.

docs/example/912ec66d7572ff821749319396470bde.svg

-2,671
This file was deleted.
Binary file not shown.
Binary file not shown.
Binary file not shown.

docs/example/index.html

+1,125-12
Large diffs are not rendered by default.

0 commit comments

Comments
 (0)