-
Notifications
You must be signed in to change notification settings - Fork 869
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chore(internal): enable building when git installed (#657)
- Loading branch information
1 parent
21ae54e
commit 8c80a7d
Showing
2 changed files
with
13 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -9,14 +9,17 @@ | |
"repository": "github:openai/openai-node", | ||
"license": "Apache-2.0", | ||
"packageManager": "[email protected]", | ||
"files": [ | ||
"*" | ||
], | ||
"private": false, | ||
"scripts": { | ||
"test": "bin/check-test-server && yarn jest", | ||
"build": "bash ./build", | ||
"prepack": "echo 'to pack, run yarn build && (cd dist; yarn pack)' && exit 1", | ||
"prepublishOnly": "echo 'to publish, run yarn build && (cd dist; yarn publish)' && exit 1", | ||
"format": "prettier --write --cache --cache-strategy metadata . !dist", | ||
"prepare": "if [ $(basename $(dirname $PWD)) = 'node_modules' ]; then npm run build; fi", | ||
"prepare": "if ./scripts/check-is-in-git-install.sh; then npm run build; fi", | ||
"tsn": "ts-node -r tsconfig-paths/register", | ||
"lint": "eslint --ext ts,js .", | ||
"fix": "eslint --fix --ext ts,js ." | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
#!/bin/bash | ||
# Check if you happen to call prepare for a repository that's already in node_modules. | ||
[ "$(basename "$(dirname "$PWD")")" = 'node_modules' ] || | ||
# The name of the containing directory that 'npm` uses, which looks like | ||
# $HOME/.npm/_cacache/git-cloneXXXXXX | ||
[ "$(basename "$(dirname "$PWD")")" = 'tmp' ] || | ||
# The name of the containing directory that 'yarn` uses, which looks like | ||
# $(yarn cache dir)/.tmp/XXXXX | ||
[ "$(basename "$(dirname "$PWD")")" = '.tmp' ] |