Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support Node.js/RequireJS/TypeScript #119

Open
wants to merge 32 commits into
base: master
Choose a base branch
from

Conversation

arcatdmz
Copy link

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 compiler tsc with the umd option that produces dist/interpreter.js that 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.js and dist/acorn_interpreter.js are generated with help of Webpack.
  • Some more demo code ... README.md shows 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 at index.html. A very simple Node.js example can also be found at index.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.

@Kreijstal
Copy link

this is out of date :(

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants