Closed happytomatoe closed 2 months ago
@happytomatoe thank you so much for this PR! Definitely something we've had as a wishlist item while our effort has been focused on the web IDE. For your purposes, you might also look into a "CLI runner", that provides a CLI or (lightweight) windowed environment for Screen + Keyboard. I'll have a review for you later today. It looks like you can start by running npm run ci
locally to ensure your CI will pass, and npm run format ; npm run fix
to apply automatic formatting and lint fixes.
@DavidSouther Could you elaborate on CLI runner? Currently incli/src/index.ts
I see that run command only accepts.tst
files
I see that run command only accepts
.tst
files
Yes; this would be an entirely new project. nand2tetris run file.tst
would still run a .tst file as expected. This new mode might be nand2tetris exec myprog.hack
, where myprog.hack
is the final compiled .jack -> vm -> hack binary file. This mode would then have the screen and keyboard interaction. Maybe we should start a new thread to discuss that!
Thank you @happytomatoe for your first PR!
As I am not using web-ide jack editor because it's slow, I've decided to add cli command to invoke Jack compiler directly