Guest User

Untitled

a guest
Jul 11th, 2018
74
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.48 KB | None | 0 0
  1. // loads files simply
  2. process.prependLoadString = '';
  3. var alreadyLoaded = [];
  4. process.load = function(file) {
  5. var file = prependLoadString + file;
  6. if (alreadyLoaded.indexOf(file) != -1) return;
  7. alreadyLoaded.push(file);
  8.  
  9. var prevLoadString = prependLoadString;
  10. process.prependLoadString = file.slice(0, file.lastIndexOf('/') + 1);
  11. process.eval('with (process) {\n' + node.fs.cat(file).wait() + "\n}");
  12. process.prependLoadString = prevLoadString;
  13. }
  14.  
  15. load('Campy/campy.js');
Add Comment
Please, Sign In to add comment