aboutsummaryrefslogtreecommitdiff

CV

Development

Install dependencies

bun install

(in a separate folder) to install Chrome with Puppeteer (does not install with Bun)

npm install puppeteer

Build HTML

bun build-html.ts

Build PDF

bun build-pdf.ts

Develop HTML with hot reload

Hot reload is on any files imported, which are template.txt and cv.json. The template is a .txt as this can be imported into Bun natively, whereas other extensions require some typescript magic to be imported.

Note that hot reload does not work with Windows files. The repository must exist on a Linux filesystem.

To do this on Windows, open \\wsl.localhost\Ubuntu\home\<user> with Explorer and open VSCode via the context menu. WSL can be used via the console window. This way, hot reload works in Bun.

Using it like this, sometimes VSCode's file explorer does not refresh properly.

bun --hot index.ts