Guest User

Untitled

a guest
Mar 21st, 2018
121
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.53 KB | None | 0 0
  1. module.exports = function(exec, data) {
  2. return function() {
  3. var moduleNameIndex = process.argv.indexOf('--module');
  4. var editorIndex = process.argv.indexOf('--editor');
  5. if(typeof moduleNameIndex === 'number') {
  6. var moduleName = process.argv[moduleNameIndex + 1];
  7. var editorName = process.argv[editorIndex + 1];
  8. var module = data.main.modules[moduleName];
  9. for(var fileIndex in module) {
  10. exec(String.prototype.concat(
  11. editorName, ' ', module[fileIndex]
  12. ));
  13. }
  14. }
  15. };
  16. };
Add Comment
Please, Sign In to add comment