production.js 386 B

123456789101112131415
  1. // Dependecies.
  2. const shelljs = require('shelljs');
  3. const publisher = require('./tasks/main');
  4. // Gets the current npm user.
  5. console.log("Using npm user:");
  6. let loginCheck = shelljs.exec('npm whoami');
  7. // If logged in process.
  8. if (loginCheck.code === 0) {
  9. publisher(true);
  10. }
  11. // If not logged in error.
  12. else {
  13. console.log('Not logged in, please log in to npm.');
  14. }