5.0.0 • Published 10 years ago

cortex-shrinkwrap v5.0.0

Weekly downloads
6
License
MIT
Repository
github
Last release
10 years ago

Cortex Shrinkwrap

NPM version Build Status

This command will lock down the versions of a package's dependencies and generate a cortex-shrinkwrap.json file in your package directory.

Install

npm install cortex-shrinkwrap -g

API

Also this lib can be used in nodejs.

var shrinkwrap = require('cortex-shrinkwrap');

var traveller = shrinkwrap(pkg, built_root, options, function(err, shrinked) {
    // console.log(shrinked);
});

traveller.on('ignoreDev', function(pkgName) {
  
});

traveller.on('ignoreAsync', function(pkgName) {
  
});

shrinkwrap(pkg, built_root, options, callback): Traveller

Generate shrinkwrap.json from pkg, return a Traveller object, see cortex-deps-traveller for more details;

pkg

Pakcage information stored in cortex.json.

built_root(=require=): path of directory where cortex packages will be built to

Options

  • dev: whehter include devDependencies
  • async: whether incldue asyncDependencies
  • stableOnly: only include stable version in shrinkwrap, default value is =false=

callback(err, shrinkedJson)

shrinktree((name, range)|pkg, options, callback)

Generate a simple deps tree with information of shrinkwrap.json

var shrinktree = require('cortex-shrinkwrap').shrinktree

shrinktree('deep-eql', "~0.1.0", built_root,  function(err, tree) {
  
});

// or provide a package json if already have one

shrinktree({
  name: 'deep-eql',
  version: '0.1.0',
  dependencies: {
     'type-detect': "~1.0.0"
  }
}, built_root, {
  enableDev: true
}, function(err, tree) {

});

name

Package name of the tree root

range

Range of the tree root

pkg

Package json as the root

Options

The same as options in shrinkwrap

License

(The MIT License)

Copyright (c) 2014, Villa.Gao <jky239@gmail.com>;
All rights reserved.
5.0.0

10 years ago

4.0.1

10 years ago

4.0.0

10 years ago

3.0.2

10 years ago

3.0.1

10 years ago

3.0.0

10 years ago

2.1.8

10 years ago

2.1.7

10 years ago

2.1.6

10 years ago

2.1.5

10 years ago

2.1.4

10 years ago

2.1.3

10 years ago

2.1.2

10 years ago

2.1.1

10 years ago

2.1.0

10 years ago

2.0.0

10 years ago

1.1.2

10 years ago

1.1.1

10 years ago

1.1.0

10 years ago

1.0.2

10 years ago

1.0.1

10 years ago

1.0.0

10 years ago

0.2.0

10 years ago

0.1.4

10 years ago

0.1.3

10 years ago

0.1.2

10 years ago

0.1.1

10 years ago

0.1.0

10 years ago

0.0.1

10 years ago

0.0.0

10 years ago