jgm / djot.js

JavaScript implementation of djot
MIT License
146 stars 16 forks source link

Benchmarks not working for matklad #16

Closed matklad closed 1 year ago

matklad commented 1 year ago

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

matklad commented 1 year ago

I think that's also a reason for https://github.com/jgm/djot.js/issues/10 ?

matklad commented 1 year ago

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:

https://github.com/jgm/djot.js/blob/9f6f7168dcc85b87f9b67e7f00b21db6ee553142/Makefile#L7-L8

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

matklad commented 1 year ago

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 1 year ago

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 1 year ago

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