rightclick
Advanced tools
Comparing version 0.1.1 to 0.2.0
# rightClick Changelog | ||
### 03 November 2013, 0.2.0 | ||
* Return false instead of throwing error on file conflicts | ||
* JSHint rules moved to rc file | ||
### 13 December 2012, 0.1.1 | ||
* Changelog added | ||
* NPM installation instructions in README | ||
* Push to enable Travis | ||
* Added test folder structure | ||
### 13 December 2012, 0.1.0 | ||
* First push to npm |
@@ -1,8 +0,1 @@ | ||
/*jslint | ||
white: true, indent: 2, browser: false, devel: false, | ||
onevar: true, nomen: true, eqeqeq: false, plusplus: true, | ||
bitwise: true, regexp: true, newcap: true, immed: false, | ||
maxlen: 80, smarttabs: false, undef: true, trailing: true, | ||
strict: false, expr: true, | ||
*/ | ||
var fs = require('fs'), | ||
@@ -9,0 +2,0 @@ sep = require('path').sep; |
@@ -1,11 +0,1 @@ | ||
/*jslint | ||
white: true, indent: 2, browser: false, devel: false, | ||
onevar: true, nomen: true, eqeqeq: false, plusplus: true, | ||
bitwise: true, regexp: true, newcap: true, immed: false, | ||
maxlen: 80, smarttabs: false, undef: true, trailing: true, | ||
strict: false, expr: true, | ||
*/ | ||
var path = require('path'), | ||
fs = require('fs'); | ||
module.exports = function (path) { | ||
@@ -12,0 +2,0 @@ |
@@ -1,10 +0,2 @@ | ||
/*jslint | ||
white: true, indent: 2, browser: false, devel: false, | ||
onevar: true, nomen: true, eqeqeq: false, plusplus: true, | ||
bitwise: true, regexp: true, newcap: true, immed: false, | ||
maxlen: 80, smarttabs: false, undef: true, trailing: true, | ||
strict: false, expr: true, | ||
*/ | ||
var path = require('path'), | ||
fs = require('fs'), | ||
var fs = require('fs'), | ||
sep = require('path').sep; | ||
@@ -11,0 +3,0 @@ |
@@ -1,16 +0,4 @@ | ||
/*jslint | ||
white: true, indent: 2, browser: false, devel: false, | ||
onevar: true, nomen: true, eqeqeq: false, plusplus: true, | ||
bitwise: true, regexp: true, newcap: true, immed: false, | ||
maxlen: 80, smarttabs: false, undef: true, trailing: true, | ||
strict: false, expr: true, | ||
*/ | ||
/*global | ||
Buffer:false, | ||
*/ | ||
// Helper modules | ||
var fs = require('fs'), | ||
sep = require('path').sep; | ||
sep = require('path').sep, | ||
log = require('col'); | ||
@@ -23,4 +11,6 @@ module.exports = function (target) { | ||
throw new Error(target + ' already exists.'); | ||
log.error(target + ' already exists.'); | ||
return false; | ||
} else { | ||
@@ -42,6 +32,6 @@ | ||
// Check item is an object but not a buffer array. | ||
if (typeof clip[item] === 'object' && !Buffer.isBuffer(clip[item])) { | ||
if (check(newTarget)) { | ||
if (check(newTarget)) { | ||
// Check item is an object but not a buffer array. | ||
if (typeof clip[item] === 'object' && !Buffer.isBuffer(clip[item])) { | ||
@@ -52,7 +42,7 @@ fs.mkdirSync(newTarget); | ||
} | ||
} else { | ||
} else { | ||
fs.writeFileSync(newTarget, clip[item]); | ||
fs.writeFileSync(newTarget, clip[item]); | ||
} | ||
@@ -59,0 +49,0 @@ } |
@@ -1,15 +0,4 @@ | ||
/*jslint | ||
white: true, indent: 2, browser: false, devel: false, | ||
onevar: true, nomen: true, eqeqeq: false, plusplus: true, | ||
bitwise: true, regexp: true, newcap: true, immed: false, | ||
maxlen: 80, smarttabs: false, undef: true, trailing: true, | ||
strict: false, expr: true, | ||
*/ | ||
var fs = require('fs'), | ||
log = require('col'); | ||
/*global | ||
require: false, | ||
*/ | ||
var fs = require('fs'); | ||
module.exports = function (location) { | ||
@@ -44,7 +33,8 @@ | ||
// Throw an error to prevent unintended results. | ||
throw new Error(location + ' not found'); | ||
log.error(location + ' not found'); | ||
return false; | ||
} | ||
}; |
{ | ||
"name": "rightclick", | ||
"description": "Cut, copy, paste and delete for node.js", | ||
"version": "0.1.1", | ||
"version": "0.2.0", | ||
"keywords": [ | ||
@@ -22,2 +22,5 @@ "cut", | ||
}, | ||
"dependencies": { | ||
"col": "*" | ||
}, | ||
"devDependencies": { | ||
@@ -24,0 +27,0 @@ "nodeunit": "0.7.x", |
@@ -46,3 +46,3 @@ // Helper modules | ||
'cut file': function(test) { | ||
test.expect(2); | ||
@@ -49,0 +49,0 @@ |
@@ -19,3 +19,3 @@ // Tested module | ||
rightClick: function(test) { | ||
test.expect(6); | ||
@@ -40,4 +40,4 @@ | ||
test.throws(function() {rightClick('./test/notFolder');}, Error, | ||
'Error thrown when passed a non existant path'); | ||
test.ok(function() {rightClick('./test/notFolder');}, | ||
'Returns false when passed a non existant path'); | ||
@@ -44,0 +44,0 @@ test.done(); |
Sorry, the diff of this file is not supported yet
Wildcard dependency
QualityPackage has a dependency with a floating version range. This can cause issues if the dependency publishes a new major version.
Found 1 instance in 1 package
10
19636
1
18
408
2
+ Addedcol@*
+ Addedcol@0.1.0(transitive)
+ Addedwhat-app@0.0.7(transitive)