eol-converter-cli
Advanced tools
Comparing version 0.0.4 to 1.0.0
{ | ||
"name": "eol-converter-cli", | ||
"version": "0.0.4", | ||
"version": "1.0.0", | ||
"description": "Newline (EOL) coverter CLI for NodeJs (github repo soon) - Currently doing only CRLF -> LF convertion", | ||
@@ -5,0 +5,0 @@ "main": "src/index.js", |
@@ -9,3 +9,3 @@ #!/usr/bin/env node | ||
const [argv] = process.argv; | ||
const argv = process.argv; | ||
const inputFiles = argv[argv.length - 1] | ||
@@ -15,2 +15,4 @@ const isWarmup = argv[argv.length - 2] === 'warmup' | ||
const dir = process.cwd() | ||
console.log('Running in directory ' + dir) | ||
console.log('Files GLOB regex: ' + inputFiles) | ||
@@ -28,3 +30,3 @@ console.log(isWarmup ? 'WARMUP: will only list files, no action will be performed - run `convertToLF` to do conversion' : '') | ||
try { | ||
const file = fs.readFileSync(fileName) | ||
const file = fs.readFileSync(path.join(dir, fileName)) | ||
const converted = isCrlf ? eol.crlf(file.toString()) : eol.lf(file.toString()) | ||
@@ -31,0 +33,0 @@ fs.writeFileSync(fileName, converted); |
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
No v1
QualityPackage is not semver >=1. This means it is not stable and does not support ^ ranges.
Found 1 instance in 1 package
2125
33
1