Comparing version 1.4.0 to 1.4.1
@@ -43,4 +43,9 @@ #!/usr/bin/env node | ||
// Saving to file | ||
fs.writeFile(filePath, JSON.stringify(sortedObject, null, indent) + ((eol && eol.length === 2) ? eol[1] : '')); | ||
fs.writeFile(filePath, JSON.stringify(sortedObject, null, indent) + ((eol && eol.length === 2) ? eol[1] : ''), function(err) { | ||
if (err) { | ||
console.error(err); | ||
process.exit(1); | ||
} | ||
}); | ||
} | ||
} |
{ | ||
"name": "sort-json", | ||
"version": "1.4.0", | ||
"version": "1.4.1", | ||
"description": "Takes a json-file and return a copy of the same file, but sorted", | ||
@@ -12,5 +12,15 @@ "main": "index.js", | ||
}, | ||
"devDependencies": {}, | ||
"devDependencies": { | ||
"chai": "^3.5.0", | ||
"dirty-chai": "^1.2.2", | ||
"eslint": "^3.8.1", | ||
"eslint-config-airbnb": "^12.0.0", | ||
"eslint-plugin-import": "^2.0.1", | ||
"eslint-plugin-jsx-a11y": "^2.2.3", | ||
"eslint-plugin-react": "^6.4.1", | ||
"mocha": "^3.1.2" | ||
}, | ||
"scripts": { | ||
"test": "echo \"Error: no test specified\" && exit 1" | ||
"test": "mocha --recursive tests", | ||
"lint": "eslint tests" | ||
}, | ||
@@ -17,0 +27,0 @@ "repository": { |
sort-json | ||
========= | ||
Takes a json-file and return a copy of the same file, but with the keys sorted | ||
It takes a JSON file and returns a copy of the same file, but with the sorted keys. | ||
@@ -25,2 +25,7 @@ installation | ||
For now sort-json takes no other arguments, so the original file will be overwritten by a sorted json file, keeping the indentation of the original file. | ||
For now sort-json takes no other arguments, so the original file will be overwritten by a sorted JSON file, keeping the indentation of the original file. | ||
tests | ||
----- | ||
`npm test` |
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 tests
QualityPackage does not have any tests. This is a strong signal of a poorly maintained or low quality package.
Found 1 instance in 1 package
5758
7
129
0
31
8