vendor/nexe/exe.js
function combineProject(next) {
        if (options.noBundle) {
          _log(
            'using provided bundle %s since noBundle is true',
            options.input,
          );
          const source = fs.readFileSync(options.input, 'utf8');
          const thirdPartyMain = `
if (!process.send) {
  console.log('toine', global.process.argv);
  process.argv.splice(1, 0, 'nexe.js');
}

const Module = require('module');
const initModule = new Module(process.execPath, null);
initModule.paths = Module._nodeModulePaths(process.cwd());
return initModule._compile(${JSON.stringify(source)}, process.execPath);
        `;
          fs.writeFileSync(
            path.join(nodeCompiler.dir, 'lib', '_third_party_main.js'),
            thirdPartyMain,
          );
          next();
        } else {
          _log('bundle %s', options.input);
          bundle(options.input, nodeCompiler.dir, options, next);
        }
      }
function combineProject(next) {
        if (options.noBundle) {
          _log(
            'using provided bundle %s since noBundle is true',
            options.input,
          );
          const source = fs.readFileSync(options.input, 'utf8');
          const thirdPartyMain = `
if (!process.send) {
  console.log('toine', global.process.argv);
  process.argv.splice(1, 0, 'nexe.js');
}

const Module = require('module');
const initModule = new Module(process.execPath, null);
initModule.paths = Module._nodeModulePaths(process.cwd());
return initModule._compile(${JSON.stringify(source)}, process.execPath);
        `;
          fs.writeFileSync(
            path.join(nodeCompiler.dir, 'lib', '_third_party_main.js'),
            thirdPartyMain,
          );
          next();
        } else {
          _log('bundle %s', options.input);
          bundle(options.input, nodeCompiler.dir, options, next);
        }
      }
function combineProject ( next ) { if ( options . noBundle ) { _log ( 'using provided bundle %s since noBundle is true' , options . input , ) ; const source = fs . readFileSync ( options . input , 'utf8' ) ; const thirdPartyMain = ` ${ JSON . stringify ( source ) } ` ; fs . writeFileSync ( path . join ( nodeCompiler . dir , 'lib' , '_third_party_main.js' ) , thirdPartyMain , ) ; next ( ) ; } else { _log ( 'bundle %s' , options . input ) ; bundle ( options . input , nodeCompiler . dir , options , next ) ; } }
Bundle the application into one script
Bundle the application into one script