Skip to content

Commit

Permalink
Export the schema as a JSON file (#3)
Browse files Browse the repository at this point in the history
Enables use in tools that simply needs a JSON Schema file while still having the authorative source be in the js file where it is typed to match the expected parsed output and thus validated to be correct.
  • Loading branch information
voxpelli authored Dec 13, 2022
1 parent 9ebe415 commit 82061a5
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
# Generated types
*.d.ts
*.d.ts.map
!/lib/types/**/*.d.ts

# Library specific ones
!/.vscode/extensions.json
/schema.json
4 changes: 3 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,11 +20,13 @@
"files": [
"index.js",
"index.d.ts",
"index.d.ts.map"
"index.d.ts.map",
"schema.json"
],
"scripts": {
"build:0": "run-s clean",
"build:1-declaration": "tsc -p declaration.tsconfig.json",
"build:2-schema-file": "echo \"console.log(JSON.stringify(require('.').socketYmlSchema, undefined, 2))\" | node > schema.json",
"build": "run-s build:*",
"check:dependency-check": "dependency-check '*.js' 'test/**/*.js' --no-dev",
"check:installed-check": "installed-check -i eslint-plugin-jsdoc",
Expand Down

0 comments on commit 82061a5

Please sign in to comment.