Skip to content

Commit 75ec1b1

Browse files
feat(api.json): compressed api.json for save space and for better compilation with webpack (#1215)
* feat(api.json): compressed api.json for save space and for better compilation with webpack * feat(api.json): compressed api.json for save space and for better compilation with webpack
1 parent 0ac8a7d commit 75ec1b1

File tree

6 files changed

+231
-212
lines changed

6 files changed

+231
-212
lines changed

generate.js

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1,4 @@
1-
require('./src/generate-api-description.js')();
1+
// require('./src/generate-api-description.js')();
2+
const {decompress} = require("compress-json");
3+
const apiJSON = require('./src/api.json');
4+
console.log(decompress(apiJSON));

package-lock.json

Lines changed: 16 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,7 @@
2727
"@hapi/hapi": "19.1.1",
2828
"async": "1.5.0",
2929
"cheerio": "0.22.0",
30+
"compress-json": "^2.1.2",
3031
"ejs": "2.5.6",
3132
"expect.js": "0.3.1",
3233
"js-beautify": "1.14.0",
@@ -39,4 +40,4 @@
3940
"stream-tester": "0.0.5",
4041
"underscore": "^1.13.1"
4142
}
42-
}
43+
}

src/api.json

Lines changed: 1 addition & 0 deletions
Large diffs are not rendered by default.

0 commit comments

Comments
 (0)