wokwi / avr8js

Arduino (8-bit AVR) simulator, written in JavaScript and runs in the browser / Node.js
https://blog.wokwi.com/avr8js-simulate-arduino-in-javascript/
MIT License
481 stars 78 forks source link

how to get rid of slash #88

Closed pfalstad closed 3 years ago

pfalstad commented 3 years ago

This is probably something really simple, but why is there a leading slash on the src URLs generated when parcel build runs on the demo project? After it runs, in demo/build/index.html, the reference to src.whatever.js or src.whatever.css all have leading slashes, which makes it impossible for the resulting output to be used inside of a larger tree. I can remove them by hand or with a script each time I build, but I was wondering if there was a way to get rid of them. Thanks.

urish commented 3 years ago

I will try to see if there's some flag that tells parcel not to do it.

In general, I hope to let go of parcel soon. Once I figure out a proper solution for preactjs/wmr#394, that'd probably be a goodbye for parcel...

pfalstad commented 3 years ago

Oh never mind I found it. Now that i knew it was parcel doing it (I thought it was the typescript compiler), I got lucky with a google search.

parcel build src/index.html --public-url ./

Thanks!

urish commented 3 years ago

Glad I was able to hint at the right direction :-)

Are you working on something like this?

https://markmegarry.github.io/AVR8js-Falstad/

pfalstad commented 3 years ago

Yes I am working on that, fixing a few things and getting it to work without forking a new version of the simulator.

urish commented 3 years ago

Lovely! If you need anything, I'm here (also on discord, #avr-internals)

pfalstad commented 3 years ago

I have put my version here: http://www.falstad.com/circuit/avr8js/

urish commented 3 years ago

Thank you Paul :-) I'm happy to see this!