Comparing version
@@ -80,2 +80,18 @@ #!/usr/bin/env node | ||
commands.isntall = | ||
commands.install = function(root, config, events, done) { | ||
console.log('checking package versions...') | ||
require('./commands/install')( | ||
root | ||
, config | ||
, events.on('info progress', function(p) { | ||
process.stdout.write(((p * 100)|0) + '% \r') | ||
}).on('spawn', function(cwd, cmd, args) { | ||
console.log(chalk.magenta('spawning'), cmd, args, chalk.grey(cwd)) | ||
}) | ||
, done | ||
) | ||
} | ||
commands.bulk = function(root, config, events, done) { | ||
@@ -122,2 +138,10 @@ config.bail = 'bail' in argv | ||
events.once('info progress', function(p) { | ||
console.log(chalk.magenta('checking registry')) | ||
}).on('info progress', function(p) { | ||
process.stdout.write(chalk.green('progress: ')) | ||
process.stdout.write(String((p * 100)|0)) | ||
process.stdout.write('% \r') | ||
}) | ||
require('./commands/open')( | ||
@@ -124,0 +148,0 @@ root |
@@ -1,5 +0,12 @@ | ||
var purge = require('./purge') | ||
var bulk = require('./bulk') | ||
var link = require('./link') | ||
// Essentially, a simple wrapper for the | ||
// following: | ||
// | ||
// aperture link && | ||
// aperture install && | ||
// aperture purge | ||
var install = require('./install') | ||
var purge = require('./purge') | ||
var link = require('./link') | ||
module.exports = init | ||
@@ -11,12 +18,3 @@ | ||
config.bulk = { | ||
command: 'npm' | ||
, args: [ | ||
'install' | ||
, '--color=always' | ||
, '--production' | ||
] | ||
} | ||
bulk(root, config, events, function(err) { | ||
install(root, config, events, function(err) { | ||
if (err) return done(err) | ||
@@ -23,0 +21,0 @@ |
{ | ||
"name": "aperture", | ||
"version": "0.5.0", | ||
"version": "1.0.0", | ||
"description": "Local dependencies helper", | ||
@@ -27,3 +27,6 @@ "main": "index.js", | ||
"pluck": "0.0.4", | ||
"chalk": "~0.4.0" | ||
"chalk": "~0.4.0", | ||
"semver": "^2.2.1", | ||
"npm-stats": "^0.3.0", | ||
"map-limit": "0.0.0" | ||
}, | ||
@@ -30,0 +33,0 @@ "devDependencies": { |
@@ -17,10 +17,12 @@ # aperture # | ||
Commands: | ||
init links, installs and purges your dependencies for fresh projects | ||
link Sets up the local links in the target directory. | ||
list Lists the modules configured to be linked. | ||
bulk Runs a shell command from each linked module. | ||
config Print out the current config being used. | ||
purge Permanently removes any module duplicates which should | ||
be linked in the tree. | ||
open links, installs and purges your dependencies for fresh projects. | ||
link Sets up the local links in the target directory. | ||
list Lists the modules configured to be linked. | ||
bulk Runs a shell command from each linked module. | ||
install Intelligently install your node dependencies for local development. | ||
config Print out the current config being used. | ||
purge Permanently removes any module duplicates which should | ||
be linked in the tree. | ||
Options: | ||
@@ -106,2 +108,19 @@ -b, --bail Exit early on reaching an error during "aperture bulk". | ||
### aperture install ### | ||
In practice, `aperture bulk npm install` works, but can take *a long time* | ||
when projects share a lot of common dependencies. The `install` command is | ||
a little smarter about this, and will install each linked module's dependencies | ||
for you in a way that minimises duplicate packages. | ||
Essentially, aperture will build a list of the dependencies required for each | ||
project and their expected version. For each dependency: | ||
* Check if all of the versions are compatible, and if so install them once | ||
in the root directory, alongside your linked modules. | ||
* Otherwise, install that module as normal. | ||
This can result in significant speedups (and a smaller `node_modules` folder) | ||
for installs when working on larger projects. | ||
### aperture purge ### | ||
@@ -108,0 +127,0 @@ |
@@ -6,8 +6,9 @@ | ||
Commands: | ||
open links, installs and purges your dependencies for fresh projects | ||
link Sets up the local links in the target directory. | ||
list Lists the modules configured to be linked. | ||
bulk Runs a shell command from each linked module. | ||
config Print out the current config being used. | ||
purge Permanently removes any module duplicates which should | ||
be linked in the tree. | ||
open links, installs and purges your dependencies for fresh projects. | ||
link Sets up the local links in the target directory. | ||
list Lists the modules configured to be linked. | ||
bulk Runs a shell command from each linked module. | ||
install Intelligently install your node dependencies for local development. | ||
config Print out the current config being used. | ||
purge Permanently removes any module duplicates which should | ||
be linked in the tree. |
URL strings
Supply chain riskPackage contains fragments of external URLs or IP addresses, which the package may be accessing at runtime.
Found 1 instance in 1 package
No v1
QualityPackage is not semver >=1. This means it is not stable and does not support ^ ranges.
Found 1 instance in 1 package
31284
27.79%31
6.9%811
28.12%1
-50%169
12.67%17
21.43%13
18.18%4
33.33%+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added