Skip to content

Commit

Permalink
Fix esbuild --watch bailing
Browse files Browse the repository at this point in the history
  • Loading branch information
luwes committed Jan 10, 2022
1 parent 6030880 commit 67a9e35
Show file tree
Hide file tree
Showing 7 changed files with 13 additions and 5 deletions.
3 changes: 3 additions & 0 deletions package.json
Expand Up @@ -26,5 +26,8 @@
"build": "lerna run build",
"prepare": "husky install && yarn build --ignore demo-*",
"release": "lerna publish"
},
"bin": {
"open-process": "scripts/open-process.js"
}
}
2 changes: 1 addition & 1 deletion packages/mux-audio-react/package.json
Expand Up @@ -13,7 +13,7 @@
"author": "Mux, Inc.",
"license": "MIT",
"scripts": {
"dev:cjs": "yarn build:cjs --watch",
"dev:cjs": "open-process | yarn build:cjs --watch",
"dev:types": "yarn build:types -w",
"dev": "npm-run-all --parallel dev:types dev:cjs",
"build:cjs": "esbuild src/index.tsx --target=es2019 --minify --bundle --sourcemap --format=cjs --outdir=dist --external:react --external:prop-types --define:PLAYER_VERSION=\"'$npm_package_version'\"",
Expand Down
2 changes: 1 addition & 1 deletion packages/mux-audio/package.json
Expand Up @@ -12,7 +12,7 @@
"author": "Mux, Inc.",
"license": "MIT",
"scripts": {
"dev:iife": "yarn build:iife --watch",
"dev:iife": "open-process | yarn build:iife --watch",
"dev:types": "yarn build:types -w",
"dev": "npm-run-all --parallel dev:types dev:iife",
"build:esm": "esbuild src/index.ts --target=es2019 --bundle --minify --sourcemap --format=esm --outdir=dist --out-extension:.js=.mjs --define:PLAYER_VERSION=\"'$npm_package_version'\"",
Expand Down
2 changes: 1 addition & 1 deletion packages/mux-video-react/package.json
Expand Up @@ -13,7 +13,7 @@
"author": "Mux, Inc.",
"license": "MIT",
"scripts": {
"dev:cjs": "yarn build:cjs --watch",
"dev:cjs": "open-process | yarn build:cjs --watch",
"dev:types": "yarn build:types -w",
"dev": "npm-run-all --parallel dev:types dev:cjs",
"build:cjs": "esbuild src/index.tsx --target=es2019 --minify --bundle --sourcemap --format=cjs --outdir=dist --external:react --external:prop-types --define:PLAYER_VERSION=\"'$npm_package_version'\"",
Expand Down
2 changes: 1 addition & 1 deletion packages/mux-video/package.json
Expand Up @@ -13,7 +13,7 @@
"author": "Mux, Inc.",
"license": "MIT",
"scripts": {
"dev:iife": "yarn build:iife --watch",
"dev:iife": "open-process | yarn build:iife --watch",
"dev:types": "yarn build:types -w",
"dev": "npm-run-all --parallel dev:types dev:iife",
"build:esm": "esbuild src/index.ts --target=es2019 --bundle --minify --sourcemap --format=esm --outdir=dist --out-extension:.js=.mjs --define:PLAYER_VERSION=\"'$npm_package_version'\"",
Expand Down
2 changes: 1 addition & 1 deletion packages/playback-core/package.json
Expand Up @@ -13,7 +13,7 @@
"author": "Mux, Inc.",
"license": "MIT",
"scripts": {
"dev:cjs": "yarn build:cjs --watch",
"dev:cjs": "open-process | yarn build:cjs --watch",
"dev:types": "yarn build:types -w",
"dev": "npm-run-all --parallel dev:types dev:cjs",
"build:cjs": "esbuild src/index.ts --target=es2019 --minify --bundle --sourcemap --format=cjs --outdir=dist --external:mux-embed --external:hls.js",
Expand Down
5 changes: 5 additions & 0 deletions scripts/open-process.js
@@ -0,0 +1,5 @@
#!/usr/bin/env node
"use strict";

setInterval(() => {}, 1 << 30);
console.info("stdin open?");

0 comments on commit 67a9e35

Please sign in to comment.