aboutsummaryrefslogtreecommitdiff
path: root/packages/bun-npm/scripts/npm-postinstall.ts
diff options
context:
space:
mode:
authorGravatar Ashcon Partovi <ashcon@partovi.net> 2023-01-23 23:06:13 -0800
committerGravatar GitHub <noreply@github.com> 2023-01-23 23:06:13 -0800
commitcab1f860e4165d6e10b33b0f05ef5567754eb53a (patch)
tree0c3cdffd9c6b2e8085b5a04b626f475badce8940 /packages/bun-npm/scripts/npm-postinstall.ts
parent7ca867f7c82e998f17885b4607be6bcdbfc12470 (diff)
downloadbun-cab1f860e4165d6e10b33b0f05ef5567754eb53a.tar.gz
bun-cab1f860e4165d6e10b33b0f05ef5567754eb53a.tar.zst
bun-cab1f860e4165d6e10b33b0f05ef5567754eb53a.zip
`npm install bun` (#1874)
* Add bun-npm package to publish and install Bun via npm * Add newlines to patchJson * Update version to latest release * Tweak semver for canary * Use GITHUB_TOKEN * Prevent bun from being run in slow mode
Diffstat (limited to 'packages/bun-npm/scripts/npm-postinstall.ts')
-rw-r--r--packages/bun-npm/scripts/npm-postinstall.ts10
1 files changed, 10 insertions, 0 deletions
diff --git a/packages/bun-npm/scripts/npm-postinstall.ts b/packages/bun-npm/scripts/npm-postinstall.ts
new file mode 100644
index 000000000..c22f2c669
--- /dev/null
+++ b/packages/bun-npm/scripts/npm-postinstall.ts
@@ -0,0 +1,10 @@
+import { importBun, optimizeBun } from "../src/install";
+
+importBun()
+ .then((path) => {
+ optimizeBun(path);
+ })
+ .catch((error) => {
+ console.error(error);
+ process.exit(1);
+ });