Publish the ingestion library to NPM (#204)
* Update client libs typescript README * Create index.d.ts files * Publish the ingestion library to NPM Library is now published at https://www.npmjs.com/package/openpipe; see README for details. * Rename package.json in /dist folder * Increment patch version * Increment package version * Add newline to publish.sh --------- Co-authored-by: David Corbitt <davidlcorbitt@gmail.com>
This commit is contained in:
27
client-libs/typescript/build.sh
Executable file
27
client-libs/typescript/build.sh
Executable file
@@ -0,0 +1,27 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
# Adapted from https://github.com/openai/openai-node/blob/master/build
|
||||
|
||||
set -exuo pipefail
|
||||
|
||||
rm -rf dist /tmp/openpipe-build-dist
|
||||
|
||||
mkdir /tmp/openpipe-build-dist
|
||||
|
||||
cp -rp * /tmp/openpipe-build-dist
|
||||
|
||||
# Rename package name in package.json
|
||||
python3 -c "
|
||||
import json
|
||||
with open('/tmp/openpipe-build-dist/package.json', 'r') as f:
|
||||
data = json.load(f)
|
||||
data['name'] = 'openpipe'
|
||||
with open('/tmp/openpipe-build-dist/package.json', 'w') as f:
|
||||
json.dump(data, f, indent=4)
|
||||
"
|
||||
|
||||
rm -rf /tmp/openpipe-build-dist/node_modules
|
||||
mv /tmp/openpipe-build-dist dist
|
||||
|
||||
# build to .js files
|
||||
(cd dist && npm exec tsc -- --noEmit false)
|
||||
Reference in New Issue
Block a user