Skip to content

Function "require" compatible with node.js in Adobe ExtendScript

License

Notifications You must be signed in to change notification settings

coderaiser/es-require

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

23 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Adobe ExtendScript Require

Function require compatible with node.js. Could be used with es-node.

Why?

In Adobe ExtendScript #include used for loading dependencies. It puts all modules to global scope. With require it could be avoided.

Example

#include 'lib/require.js';

var dir = File($.fileName).path + '/';
require.dir(dir);

var fs = require('./lib/fs');
var data = fs.readFileSync('./name');

alert(data);

See Also

License

MIT

About

Function "require" compatible with node.js in Adobe ExtendScript

Resources

License

Stars

Watchers

Forks

Packages

No packages published