Support Node Modules
Phillipus opened this issue · 2 comments
Phillipus commented
This is to track the work of @jbsarrodie to implement node modules.
Dev branch: dev-jb.
Phillipus commented
Simple test case:
- In your jArchi script folder create a file
test_module.ajs
containing this:
const speaker = require("helloworld");
speaker.sayHelloWorld();
- In your jArchi script folder create a sub-folder named
node_modules
- In the
node_modules
folder create a sub-folder namedhelloworld
- In the
helloworld
folder create a fileindex.js
containing this:
exports.sayHelloWorld = function() {
window.alert("Hello World!");
}
- Run the
test_module.ajs
script
Files attached here: script.zip
Phillipus commented
Committed to master and added a wiki entry.