-
Notifications
You must be signed in to change notification settings - Fork 3
/
build
28 lines (23 loc) · 952 Bytes
/
build
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
#!/usr/bin/env bash
set -exuo pipefail
rm -rf dist; mkdir dist
cp -rp package README.md dist
for file in LICENSE CHANGELOG.md; do
if [ -e "${file}" ]; then cp "${file}" dist; fi
done
node scripts/make-dist-package-json.cjs > dist/package.json
npm exec tsc-multi
npm exec tsc-alias -- -p tsconfig.build.json
node scripts/fix-index-exports.cjs
cp dist/index.d.ts dist/index.d.mts
cp tsconfig.dist-src.json dist/package/tsconfig.json
find dist -type f -exec node scripts/remove-triple-slash-references.cjs {} +
npm exec prettier -- --loglevel=warn --write .
# make sure that nothing crashes when we require the output CJS or
# import the output ESM
(cd dist && node -e 'require("llm-ops")')
(cd dist && node -e 'import("llm-ops")' --input-type=module)
# Path: build-docs
api-extractor run --local --verbose
rm -rf docs/api;mkdir -p docs/api
npx api-documenter markdown --input-folder './temp' --output-folder './docs/api'