Function require
compatible with node.js.
Could be used with es-node.
In Adobe ExtendScript #include
used for loading dependencies.
It puts all modules to global scope. With require
it could be avoided.
#include 'lib/require.js';
var dir = File($.fileName).path + '/';
require.dir(dir);
var fs = require('./lib/fs');
var data = fs.readFileSync('./name');
alert(data);
MIT