neuron-tree
Advanced tools
Comparing version 2.0.1 to 2.0.2
22
index.js
@@ -17,2 +17,3 @@ 'use strict'; | ||
// - cwd {path} | ||
// - ignore_shrink_file {Boolean=false} | ||
function tree (pkg, options, callback) { | ||
@@ -63,2 +64,13 @@ options || (options = {}); | ||
var keys = options.dependencyKeys; | ||
var shrink_options = { | ||
stableOnly: true, | ||
async: ~keys.indexOf('asyncDependencies'), | ||
dev: ~keys.indexOf('devDependencies') | ||
}; | ||
if (options.ignore_shrink_file) { | ||
return shrinkwrap(pkg, options.built_root, shrink_options, callback); | ||
} | ||
fs.exists(shrinkwrap_json, function(exists) { | ||
@@ -68,11 +80,3 @@ if (exists) { | ||
} | ||
var keys = options.dependencyKeys; | ||
shrinkwrap(pkg, options.built_root, { | ||
stableOnly: true, | ||
async: ~keys.indexOf('asyncDependencies'), | ||
dev: ~keys.indexOf('devDependencies') | ||
}, callback); | ||
shrinkwrap(pkg, options.built_root, shrink_options, callback); | ||
}); | ||
@@ -79,0 +83,0 @@ }; |
{ | ||
"name": "neuron-tree", | ||
"version": "2.0.1", | ||
"version": "2.0.2", | ||
"description": "Generates the config.tree of neuron", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
@@ -50,2 +50,3 @@ # neuron-tree [![NPM version](https://badge.fury.io/js/neuron-tree.svg)](http://badge.fury.io/js/neuron-tree) [![Build Status](https://travis-ci.org/cortexjs/neuron-tree.svg?branch=master)](https://travis-ci.org/cortexjs/neuron-tree) [![Dependency Status](https://gemnasium.com/cortexjs/neuron-tree.svg)](https://gemnasium.com/cortexjs/neuron-tree) | ||
- dependencyKeys `Array=['dependencies', 'asyncDependencies']` | ||
- ignore_shrink_file `Boolean=false` if true, `neuron-tree` will always generate new shrinkwrap tree. | ||
@@ -52,0 +53,0 @@ ##### dependencyKeys |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
12499
363
83