vendor/nexe/exe.js
function _loop(dir) {
            /* eventually try every python file */
            var pdir = fs.readdirSync(dir);

            pdir.forEach(function(v, i) {
              var stat = fs.statSync(dir + '/' + v);
              if (stat.isFile()) {
                // only process Makefiles and .mk targets.
                if (v !== 'Makefile' && path.extname(v) !== '.mk') {
                  return;
                }

                _log('patching ' + v);

                /* patch the file */
                var py = fs.readFileSync(dir + '/' + v, {
                  encoding: 'utf8',
                });
                py = py.replace(/([a-z]|\/)*python(\w|)/gm, isPy); // this is definently needed
                fs.writeFileSync(dir + '/' + v, py, {
                  encoding: 'utf8',
                }); // write to file
              } else if (stat.isDirectory()) {
                // must be dir?
                // skip tests because we don't need them here
                if (v !== 'test') {
                  _loop(dir + '/' + v);
                }
              }
            });
          }
function _loop(dir) {
            /* eventually try every python file */
            var pdir = fs.readdirSync(dir);

            pdir.forEach(function(v, i) {
              var stat = fs.statSync(dir + '/' + v);
              if (stat.isFile()) {
                // only process Makefiles and .mk targets.
                if (v !== 'Makefile' && path.extname(v) !== '.mk') {
                  return;
                }

                _log('patching ' + v);

                /* patch the file */
                var py = fs.readFileSync(dir + '/' + v, {
                  encoding: 'utf8',
                });
                py = py.replace(/([a-z]|\/)*python(\w|)/gm, isPy); // this is definently needed
                fs.writeFileSync(dir + '/' + v, py, {
                  encoding: 'utf8',
                }); // write to file
              } else if (stat.isDirectory()) {
                // must be dir?
                // skip tests because we don't need them here
                if (v !== 'test') {
                  _loop(dir + '/' + v);
                }
              }
            });
          }
function _loop ( dir ) { /* eventually try every python file */ var pdir = fs . readdirSync ( dir ) ; pdir . forEach ( function ( v , i ) { var stat = fs . statSync ( dir + '/' + v ) ; if ( stat . isFile ( ) ) { // only process Makefiles and .mk targets. if ( v !== 'Makefile' && path . extname ( v ) !== '.mk' ) { return ; } _log ( 'patching ' + v ) ; /* patch the file */ var py = fs . readFileSync ( dir + '/' + v , { encoding : 'utf8' , } ) ; py = py . replace ( / ([a-z]|\/)*python(\w|) / gm , isPy ) ; // this is definently needed fs . writeFileSync ( dir + '/' + v , py , { encoding : 'utf8' , } ) ; // write to file } else if ( stat . isDirectory ( ) ) { // must be dir? // skip tests because we don't need them here if ( v !== 'test' ) { _loop ( dir + '/' + v ) ; } } } ) ; }
local function, move to top eventually
local function move to top eventually