decompress
Advanced tools
Comparing version 0.2.4 to 0.2.5
16
cli.js
@@ -5,3 +5,3 @@ #!/usr/bin/env node | ||
var decompress = require('./'); | ||
var extname = require('extname'); | ||
var extname = require('ext-name'); | ||
var fs = require('fs'); | ||
@@ -71,8 +71,14 @@ var nopt = require('nopt'); | ||
function run(input) { | ||
var src = input; | ||
var dest = opts.out || process.cwd(); | ||
var ext = '.' + extname(src).ext; | ||
src.forEach(function (s) { | ||
fs.createReadStream(s).pipe(decompress({ ext: ext, path: dest, strip: opts.strip })); | ||
input.forEach(function (src) { | ||
extname(src, function (err, res) { | ||
if (err) { | ||
console.error(err); | ||
process.exit(1); | ||
} | ||
var ext = '.' + res.ext; | ||
fs.createReadStream(src).pipe(decompress({ ext: ext, path: dest, strip: opts.strip })); | ||
}); | ||
}); | ||
@@ -79,0 +85,0 @@ } |
'use strict'; | ||
var fs = require('fs'); | ||
var map = require('map-key'); | ||
var mkdir = require('mkdirp'); | ||
@@ -89,3 +88,3 @@ var path = require('path'); | ||
src = src.toLowerCase(); | ||
return map(this.extractors, src); | ||
return this.extractors[src]; | ||
}; | ||
@@ -92,0 +91,0 @@ |
{ | ||
"name": "decompress", | ||
"version": "0.2.4", | ||
"version": "0.2.5", | ||
"description": "Easily extract zip, tar and tar.gz archives", | ||
@@ -33,5 +33,4 @@ "license": "MIT", | ||
"adm-zip": "^0.4.3", | ||
"extname": "^0.1.1", | ||
"ext-name": "^1.0.0", | ||
"get-stdin": "^0.1.0", | ||
"map-key": "^0.1.1", | ||
"mkdirp": "^0.3.5", | ||
@@ -38,0 +37,0 @@ "nopt": "^2.2.0", |
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
8110
9
225
+ Addedext-name@^1.0.0
+ Addedext-name@1.0.1(transitive)
- Removedextname@^0.1.1
- Removedmap-key@^0.1.1
- Removedextname@0.1.5(transitive)
- Removedlodash@2.4.2(transitive)
- Removedmap-key@0.1.5(transitive)