Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

nh

Package Overview
Dependencies
Maintainers
1
Versions
13
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

nh - npm Package Compare versions

Comparing version 0.1.1 to 0.1.2

28

lib/install.js

@@ -5,3 +5,26 @@ 'use strict';

var npm = require('npm');
var chalk = require('chalk');
/* stuff i'm working on
// install all packages
program
.command('i')
.description('install all packages specified')
.option('-s, --silent', 'do not output anything')
.action(function (options) {
var npmconf = {};
if (options.silent) {
npmconf.loglevel = 'silent';
} else {
npmconf.loglevel = 'http';
}
npm.load(npmconf, function (err, npm) {
if (err) throw err;
var tmpPkg = require(process.cwd() + '/package.json');
for (var p in tmpPkg['dependencies']) {
console.log(p);
}
});
}); */
// install a package
program

@@ -19,2 +42,3 @@ .command('i <pkg...>')

npm.load(npmconf, function (err, npm) {
console.log(chalk.bgWhite(chalk.black('nh')) + ' about to install %s', pkg.join(' '));
npm.commands.install(pkg, function (err) {

@@ -26,2 +50,3 @@ if (err) throw err;

// install and save a package
program

@@ -40,2 +65,3 @@ .command('is <pkg...>')

npm.load(npmconf, function (err, npm) {
console.log(chalk.bgWhite(chalk.black('nh')) + ' about to install and save %s', pkg.join(' '));
npm.commands.install(pkg, function (err) {

@@ -47,2 +73,3 @@ if (err) throw err;

// install and save a package to dev dependencies
program

@@ -61,2 +88,3 @@ .command('isd <pkg...>')

npm.load(npmconf, function (err, npm) {
console.log(chalk.bgWhite(chalk.black('nh')) + ' about to install and save %s to dev dependencies', pkg.join(' '));
npm.commands.install(pkg, function (err) {

@@ -63,0 +91,0 @@ if (err) throw err;

3

package.json
{
"name": "nh",
"version": "0.1.1",
"version": "0.1.2",
"description": "npm helpers",

@@ -25,2 +25,3 @@ "author": "Jona Hugger <jona@kyr.li> (http://kyr.li)",

"dependencies": {
"chalk": "^0.5.1",
"commander": "^2.5.0",

@@ -27,0 +28,0 @@ "npm": "^2.1.10"

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc