diff options
-rw-r--r-- | packages/sra-api/build_scripts/buildJson.ts | 6 | ||||
-rw-r--r-- | packages/sra-api/package.json | 2 |
2 files changed, 7 insertions, 1 deletions
diff --git a/packages/sra-api/build_scripts/buildJson.ts b/packages/sra-api/build_scripts/buildJson.ts new file mode 100644 index 000000000..ea99a0823 --- /dev/null +++ b/packages/sra-api/build_scripts/buildJson.ts @@ -0,0 +1,6 @@ +import { writeFileSync } from 'fs'; + +import { api } from '../src'; + +const apiJson = JSON.stringify(api); +writeFileSync('lib/api.json', apiJson); diff --git a/packages/sra-api/package.json b/packages/sra-api/package.json index a9bc934fe..5fed56303 100644 --- a/packages/sra-api/package.json +++ b/packages/sra-api/package.json @@ -19,7 +19,7 @@ "clean": "shx rm -rf lib", "build": "tsc && yarn build-json", "build-site": "yarn build && redoc-cli bundle lib/api.json --output public/index.html", - "build-json": "ts-node scripts/buildJson.ts", + "build-json": "ts-node build_scripts/buildJson.ts", "build-json:watch": "chokidar 'src/**/*' -c 'yarn build-json' ", "deploy-site": "discharge deploy" }, |