nitrous-oxide icon indicating copy to clipboard operation
nitrous-oxide copied to clipboard

Vanilla JS?

Open silentjay opened this issue 4 years ago • 2 comments

Any chance of having a vanilla js version of this we can simple add as a script tag in our projects? I'm a backend dev and i'm using turbo specifically to avoid a load of frontend js in my projects and keep them simple. I'm guessing as nitrous-oxide is typescript I'm going to have to install a load of dependencies etc

silentjay avatar Apr 01 '21 11:04 silentjay

This can be used without build tooling via https://www.skypack.dev/view/nitrous-oxide. But if you're looking for a more traditional UMD build that you can vendor into your source control and include via a regular <script tag (e.g. NOT type="module") then you can checkout turbo and our UMD builds: https://unpkg.com/[email protected]/dist/nitrous-oxide.umd.production.min.js and https://unpkg.com/@hotwired/[email protected]/dist/turbo.es2017-umd.js I think the script tag for turbo would need to be before the script tag for nitrous oxide. Let me know if this works for you or if you run into any issues. Would like to add docs on how to use without build tooling, just haven't had time to test that approach myself.

fleck avatar Apr 04 '21 01:04 fleck

Thanks for the reply. The skypack import works a charm. Did need to remove the existing turbo script import first.

silentjay avatar Apr 04 '21 21:04 silentjay