cyclic.js 530 B

12345678910111213
  1. // v1.3.7 November 1, 2013
  2. // https://github.com/bevry/base
  3. (function(){
  4. var fsUtil = require('fs'),
  5. name = require('./package.json').name;
  6. if ( fsUtil.existsSync('.git') === true && fsUtil.existsSync('./node_modules/'+name) === false ) {
  7. require('child_process').spawn(
  8. process.platform.indexOf('win') === 0 ? process.execPath.replace('node.exe', 'npm.cmd') : 'npm',
  9. ['install', '--force', name],
  10. {env:process.env, cwd:process.cwd(), stdio:'inherit'}
  11. ).on('error', console.log).on('close', console.log);
  12. }
  13. })()