Skip to content

Commit 98f035f

Browse files
authored
Default to built-in CSS and JS files (#344)
1 parent be5390d commit 98f035f

File tree

2 files changed

+6
-2
lines changed

2 files changed

+6
-2
lines changed

CHANGELOG.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,9 @@ and this project adheres to [Semantic Versioning](http://semver.org/).
99
### Fixed
1010
- Use correct favicon ([#341](https://github.com/cucumber/html-formatter/pull/341))
1111

12+
### Changed
13+
- [JavaScript] Default to built-in CSS and JS files ([#344](https://github.com/cucumber/html-formatter/pull/344))
14+
1215
## [21.7.0] - 2024-08-12
1316
### Changed
1417
- Updated dependencies to support latest messages

javascript/src/CucumberHtmlStream.ts

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
import * as messages from '@cucumber/messages'
22
import fs from 'fs'
3+
import path from 'path'
34
import { Readable, Transform, TransformCallback } from 'stream'
45

56
export class CucumberHtmlStream extends Transform {
@@ -12,8 +13,8 @@ export class CucumberHtmlStream extends Transform {
1213
* @param jsPath
1314
*/
1415
constructor(
15-
private readonly cssPath: string,
16-
private readonly jsPath: string
16+
private readonly cssPath: string = path.join(__dirname, '..', 'main.css'),
17+
private readonly jsPath: string = path.join(__dirname, '..', 'main.js')
1718
) {
1819
super({ objectMode: true })
1920
}

0 commit comments

Comments
 (0)