archimatetool/archi-scripting-plugin

Support Node Modules

Phillipus opened this issue · 2 comments

This is to track the work of @jbsarrodie to implement node modules.

Dev branch: dev-jb.

Simple test case:

  1. In your jArchi script folder create a file test_module.ajs containing this:
const speaker = require("helloworld");
speaker.sayHelloWorld();
  1. In your jArchi script folder create a sub-folder named node_modules
  2. In the node_modules folder create a sub-folder named helloworld
  3. In the helloworld folder create a file index.js containing this:
exports.sayHelloWorld = function() {
    window.alert("Hello World!");
}
  1. Run the test_module.ajs script

Files attached here: script.zip

Committed to master and added a wiki entry.