Closed rexxars closed 5 years ago
Variable declarations moved. Not sure about browser testing - perhaps we could try out tape-run? Uses electron, by default. Thoughts?
Yeah sure let’s try that! Seems like tape-run, through browser-run, uses electron
by default.
It seems to accept other browsers, such as chrome
, but then we need to install chrome it in Travis (apparently firefox is already on travis). I think I’d prefer a “pure” browser over electron, but I wouldn’t suggest spending too much time on it.
Browser tests added. tape-run
installs electron automatically, so I figured running the tests by default in electron (for developer ergonomics) and in both Electron and Firefox on Travis would be a good bet, so that's what I went for.
Published, thanks @rexxars!
Thanks a bunch <3
I briefly discussed this with you (@wooorm) on Gitter - that the main bulk of remark-parse (in byte size) stems from this library including
character-entities
as a dependency.You had a brilliant and simple solution in that one could actually just use
innerHTML
+textContent
to decode entities in the browser.This is a first stab at the problem. Tests seem to pass (do you have a preferred way of testing on CI in browsers?) both in node and browser, and the size decrease is already quite significant:
Feel free to change any part of this you don't like - code style or implementation-wise, obviously.