JS-Interpreter
JS-Interpreter copied to clipboard
Support Node.js/RequireJS/TypeScript
I've been a big fan of this interpreter for several years, and have used this for my research projects such as TextAlive and f3.js - so let me firstly thank you for open-sourcing such a valuable codebase. I forked my own code which has evolved by itself for a while, and yesterday, noticed that the original repo is still growing ... significantly!
So, instead of merging all the recent changes into my own fork, I decided to create a fresh fork that matches my needs and that could benefit more people, hopefully including the original authors of this interpreter.
This fork contains the following changes:
- Ported to TypeScript ... the main body of the interpreter is ported to TypeScript with more strict type checking. Type definition is available at
dist/interpreter.d.ts. - Packed with
tsc... the main body of the interpreter is now compiled with the TypeScript compilertscwith theumdoption that producesdist/interpreter.jsthat can be loaded from a web browser with RequireJS or from a Node.js environment. - Packed with
webpack... to statically load the library from a web browser,dist/interpreter.global.jsanddist/acorn_interpreter.jsare generated with help of Webpack. - Some more demo code ...
README.mdshows basic usage.https://junkato.jp/JS-Interpreter/shows the demo of running { raw sources, compressed bundle, dynamically loaded library } whose source code can be found atindex.html. A very simple Node.js example can also be found atindex.ts.
To build the repo, simply type npm install, and then, type either one of npm run build, npm run build-global, or npm run build-with-acorn.
this is out of date :(