Comparing version
@@ -5,3 +5,3 @@ { | ||
"license": "MIT", | ||
"version": "1.2.0", | ||
"version": "1.2.2", | ||
"author": "Alessandro Maclaine <almaclaine@gmail.com>", | ||
@@ -21,3 +21,3 @@ "main": "replace.js", | ||
"chalk": "2.4.2", | ||
"minimatch": "3.0.4", | ||
"minimatch": "3.0.5", | ||
"yargs": "^15.3.1" | ||
@@ -24,0 +24,0 @@ }, |
@@ -98,5 +98,5 @@ # COMMON ISSUE ON WINDOWS | ||
replacement: "bar", | ||
paths: ['.'], | ||
recursive: true, | ||
silent: true, | ||
paths: ['./Test/'], | ||
recursive: false, | ||
silent: false, | ||
}); | ||
@@ -103,0 +103,0 @@ ``` |
@@ -152,7 +152,10 @@ var fs = require("fs"), | ||
text = replacizeText(text, file); | ||
if (canReplace && text !== null) { | ||
fs.writeFileSync(file, text); | ||
} else if (text) { | ||
matched.push(text); | ||
var replacizedText = replacizeText(text, file); | ||
if (replacizedText !== null) { | ||
if (canReplace) { | ||
fs.writeFileSync(file, replacizedText); | ||
} else { | ||
matched.push({ text, path: file }); | ||
} | ||
} | ||
@@ -159,0 +162,0 @@ } |
@@ -16,14 +16,15 @@ var fs = require("fs"), | ||
test('quotes parsing', function (t) { | ||
t.plan(1); | ||
var input = join("test_files/test_basic.txt"); | ||
var original = getText(input); | ||
t.on("end", function () { | ||
fs.writeFileSync(input, original, "utf-8"); | ||
}); | ||
child_process.spawnSync(process.execPath, [bin, "ac", "'single'", input]); | ||
t.equal(getText(input), "aa'single'cc"); | ||
}); | ||
// | ||
// test('quotes parsing', function (t) { | ||
// t.plan(1); | ||
// | ||
// var input = join("test_files/test_basic.txt"); | ||
// var original = getText(input); | ||
// t.on("end", function () { | ||
// fs.writeFileSync(input, original, "utf-8"); | ||
// }); | ||
// | ||
// child_process.spawnSync(process.execPath, [bin, "ac", "'single'", input]); | ||
// | ||
// t.equal(getText(input), "aa'single'cc"); | ||
// }); |
23569
0.57%607
1%+ Added
- Removed
Updated