publish.js

20 lines | 382 B Blame History Raw Download
var npm = require("npm");
var open = require("open");

npm.load(function(err) {
npm.commands.run(['webpack-production'], function(er, data) {
    // log errors or data
    if (er){
      console.error(er);
    }

    if (data) {
      console.log("Publish done!");
    }
  });

  npm.on('log', function(message) {
    // log installation progress
    console.log(message);
  });
});