5etools-utils 0.16.3 → 0.16.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/UtilFs.js +2 -2
- package/package.json +2 -1
package/lib/UtilFs.js
CHANGED
|
@@ -30,8 +30,8 @@ function readJsonSync (path, {isIncludeRaw = false} = {}) {
|
|
|
30
30
|
}
|
|
31
31
|
}
|
|
32
32
|
|
|
33
|
-
function writeJsonSync (filePath, data, {isClean = false} = {}) {
|
|
34
|
-
let str = `${JSON.stringify(data, null, "\t")}\n`;
|
|
33
|
+
function writeJsonSync (filePath, data, {isClean = false, isMinify = false} = {}) {
|
|
34
|
+
let str = `${isMinify ? JSON.stringify(data) : JSON.stringify(data, null, "\t")}\n`;
|
|
35
35
|
if (isClean) str = getCleanString(str);
|
|
36
36
|
return fs.writeFileSync(filePath, str, "utf-8");
|
|
37
37
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "5etools-utils",
|
|
3
|
-
"version": "0.16.
|
|
3
|
+
"version": "0.16.4",
|
|
4
4
|
"description": "Shared utilities for the 5etools ecosystem.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "lib/Api.js",
|
|
@@ -42,6 +42,7 @@
|
|
|
42
42
|
"test:js": "node --localstorage-file test/localstorage.tmp --experimental-vm-modules node_modules/jest/bin/jest.js",
|
|
43
43
|
"lint": "npm run lint:js",
|
|
44
44
|
"lint:js": "eslint lib node test --fix",
|
|
45
|
+
"lint:js:fast": "node bin/lint-js-changed.js",
|
|
45
46
|
"preversion": "npm t"
|
|
46
47
|
},
|
|
47
48
|
"repository": {
|