]>
git.wh0rd.org - tt-rss.git/blob - lib/dojo/node.js.uncompressed.js
1 define("dojo/node", ["dojo/has"], function(has
){
3 throw new Error("node plugin failed to load because environment is not Node.js");
8 // This AMD plugin module allows native Node.js modules to be loaded by AMD modules using the Dojo
9 // loader. Note that this plugin will not work with AMD loaders other than the Dojo loader.
11 // | require(["dojo/node!fs"], function(fs){
12 // | var fileData = fs.readFileSync("foo.txt", "utf-8");
15 load: function(/*string*/ id
, /*Function*/ require
, /*Function*/ load
){
17 // Standard AMD plugin interface. See https://github.com/amdjs/amdjs-api/wiki/Loader-Plugins
20 if(!require
.nodeRequire
){
21 throw new Error("Cannot find native require function");
24 load(require
.nodeRequire(id
));