Avatar for stuggiboy

stuggiboy

Member since Feb 2018 • Last active Mar 2018
  • 0 conversations
  • 2 comments

Most recent activity

  • in JavaScript
    Avatar for stuggiboy

    Settings > Project > Select Directory for Sandbox

    Unfortunately, this does not work when a module requires another module, for example:

    // projects/hello_world.js
    require('hello').run();
    
    // modules/hello.js
    var world = require('world');
    exports.run = function(){ print('Hello ' + world.get()); };
    
    // modules/world.js
    exports.get = function(){ return 'world'; };
    

    In the code above - module 'hello' requires module 'world', which does not seem to work, regardless of where you put 'world' and how you include it (as separate module - under 'modules/world.js', or in a subfolder - like 'modules/hello/world.js').

    As already described above, current workaround is to serve modules from a server of your choice:

    • setup your server to serve static files from the 'modules' folder;
    • Web IDE > Settings > Communications > Module URL - put URL of the 'modules' folder (e.g. "http://localhost:9080/modules")

    __
    Am I doing it wrong, or are there plans to enable including local nested modules in the future?
    (Web IDE v0.68.6)

Actions