Comparing version 1.0.0 to 1.1.0
@@ -5,3 +5,3 @@ { | ||
"author": "Dav Glass <davglass@gmail.com>", | ||
"version": "1.0.0", | ||
"version": "1.1.0", | ||
"dependencies": { | ||
@@ -13,2 +13,3 @@ "graceful-fs": "~4.1.2", | ||
"main": "./lib/index.js", | ||
"bin": "./bin/cpr", | ||
"devDependencies": { | ||
@@ -27,3 +28,4 @@ "istanbul": "~0.4.0", | ||
"Brian J Brennan <brianloveswords@gmail.com>", | ||
"Elijah Insua <tmpvar@gmail.com>" | ||
"Elijah Insua <tmpvar@gmail.com>", | ||
"Jonny Reeves <github@jonnyreeves.co.uk>" | ||
], | ||
@@ -30,0 +32,0 @@ "keywords": [ |
@@ -63,2 +63,8 @@ CPR (cp -R) | ||
CLI | ||
--- | ||
`cpr` can also be used from the command line which is useful for cross platform support. | ||
![cpr](../master/cpr.jpg?raw=true) |
@@ -7,2 +7,3 @@ var vows = require('vows'), | ||
cpr = require('../lib'), | ||
exec = require('child_process').exec, | ||
to = path.join(__dirname, './out/'), | ||
@@ -368,2 +369,40 @@ from = path.join(__dirname, '../node_modules'); | ||
} | ||
}, | ||
"should work as a standalone bin": { | ||
"and should copy node_modules": { | ||
topic: function() { | ||
var out = path.join(to, '4'), | ||
self = this; | ||
this.outDir = out; | ||
exec('node ./bin/cpr ' + from + ' ' + out, function(err) { | ||
var t = { | ||
dirs: { | ||
from: fs.readdirSync(from).sort(), | ||
to: fs.readdirSync(out).sort() | ||
} | ||
}; | ||
self.callback(err, t); | ||
}); | ||
}, | ||
'has ./out/4': function(topic) { | ||
var stat = fs.statSync(this.outDir); | ||
assert.ok(stat.isDirectory()); | ||
}, | ||
'and dirs are equal': function(topic) { | ||
assert.deepEqual(topic.dirs.to, topic.dirs.from); | ||
}, | ||
'and from directory has graceful-fs dir': function(topic) { | ||
var fromHasGFS = topic.dirs.from.some(function(item) { | ||
return (item === 'graceful-fs'); | ||
}); | ||
assert.isTrue(fromHasGFS); | ||
}, | ||
'and to directory has graceful-fs dir': function(topic) { | ||
var toHasGFS = topic.dirs.to.some(function(item) { | ||
return (item === 'graceful-fs'); | ||
}); | ||
assert.isTrue(toHasGFS); | ||
} | ||
} | ||
} | ||
@@ -370,0 +409,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
Shell access
Supply chain riskThis module accesses the system shell. Accessing the system shell increases the risk of executing arbitrary code.
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
47570
10
708
70
1