Created
February 12, 2014 07:13
-
-
Save ProfAvery/8951231 to your computer and use it in GitHub Desktop.
Shim for running simple Node.js modules with jrunscript
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(function(global) { | |
if (typeof java !== "undefined") { | |
this.console = { log: function(s) { println(s); } } | |
// Download from https://raw.github.com/micmath/Rhino-Require/master/src/require.js | |
load("require.js"); | |
} | |
}(this)); | |
// Call console.log() and require() as usual |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment