Skip to content

Commit 2d18f17

Browse files
authored
feat: refactor & add way to previsualize reports to improve HTML/CSS (#374)
1 parent 18e5d12 commit 2d18f17

File tree

14 files changed

+1080
-89
lines changed

14 files changed

+1080
-89
lines changed

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -63,6 +63,7 @@ jsdoc/
6363
temp/
6464
json/
6565
reports/
66+
preview/
6667
dist/
6768
.nodesecurerc
6869
.DS_Store

README.md

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -204,6 +204,15 @@ export interface ReportChart {
204204
}
205205
```
206206

207+
## Scripts
208+
209+
You can generate a preview of a report using the following NPM scripts
210+
211+
```bash
212+
$ npm run preview:light
213+
$ npm run preview:dark
214+
```
215+
207216
## Contributors ✨
208217

209218
<!-- ALL-CONTRIBUTORS-BADGE:START - Do not remove or modify this section -->

package.json

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,9 @@
1616
"prepublishOnly": "pkg-ok",
1717
"lint": "eslint src test",
1818
"test-only": "glob -c \"node --test-reporter=spec --test\" \"./test/**/*.spec.js\"",
19-
"test": "c8 --all --src ./src -r html npm run test-only"
19+
"test": "c8 --all --src ./src -r html npm run test-only",
20+
"preview:light": "node --no-warnings ./scripts/preview.js --theme light",
21+
"preview:dark": "node --no-warnings ./scripts/preview.js --theme dark"
2022
},
2123
"repository": {
2224
"type": "git",
@@ -59,6 +61,7 @@
5961
"c8": "^10.1.2",
6062
"eslint": "^9.6.0",
6163
"glob": "^10.4.3",
64+
"open": "^10.1.0",
6265
"pkg-ok": "^3.0.0"
6366
},
6467
"engines": {

0 commit comments

Comments
 (0)