3 ms·
It's written in JS so you'll need node to run it I happily run JS in my browser all day. Why do I need node for this code?
by TekMol 8y ago
It's written in JS so you'll need node to run it
I happily run JS in my browser all day. Why do I need node for this code?
- codetrotter 8y ago> Why do I need node for this code? The next paragraph of the comment you replied to answers that — you don’t, you can use https://ballercat.github.io/walt/ https://ballercat.github.io/walt/ in your browser.
- manigandham 8y agoBecause different runtimes support different features and performance (like dealing with files and disk access) but I already posted the link for the browser version in that comment.
- cousin_it 8y agoI think that's not quite what was asked for. What was asked for is one JS file with a function that takes a string and returns a string. Not a node package, not a website. Check out Three.js, it's a big library which can be used as one file three.min.js.
- gchq-7703 8y agoIf you check the `dist` folder within the linked Git repository you can see a `walt.min.js` file[0]. You should be able to include that file and try out the package in your browser in a similar way to how you use `three.min.js`. [0] https://github.com/ballercat/walt/blob/master/packages/walt-compiler/dist/walt.min.js https://github.com/ballercat/walt/blob/master/packages/walt-...
- humblebee 8y agohttps://unpkg.com/walt-compiler@0.16.2/dist/walt.js https://unpkg.com/walt-compiler@0.16.2/dist/walt.js
- rymate1234 8y agoMaybe so you can deliver precompiled wasm to a browser rather than having to deliver the source and a compiler?
- krapp 8y agoYou don't need node to compile WASM or deliver it to the browser, either. The only reason this "needs" NPM is because it's become convention that all javascript projects need NPM and some related toolchain regardless of their complexity.
- derefr 8y agoNo, the convention is that Javascript projects are distributed as source rather than as "binaries" (single minified JS files.) Source code generally needs a build tool. NPM is a build tool.