jgm/djot.js

Benchmarks not working for matklad

matklad opened this issue · 5 comments

Ok, I think I've figured that out. npm run build produces ./dist, but not ./lib. npx tsc is the thing which produces ./lib.

I think that's also a reason for #10 ?

Ok, yeah, indeed. If I clone a repo, and run npm install -g . without running tsc manually, I don't get a djot cli utility. If I run the tsc, I get it.

So I would hasard a guess that what happens is that thee Makefile on @jgm machine is the thig which invokes tsc and makes the stuff work:

djot.js/Makefile

Lines 7 to 8 in 9f6f716

build:
tsc

npm howevere is unaware of Makefile, only does webpack, which then breaks benchmarks and installation.

Inb4 "any idea how to fix it": not really, I very carefully designed my software engineer career to mostly avoid npm, webpack and related technologies :D

jgm commented

OK, just use make bench -- it now runs tsc first.
I also fixed npm run build so it does both tsc and webpack.

jgm commented

For good measure I'll add tsc to npm run bench so you can add the parameter: npm run bench PATTERN