Skip to content

Commit 2ff3a61

Browse files
committed
feat: copy minified file to example
Instead of using a symlink, which doesn't work on Windows, we copy the minified file to the examples folder. Fixes #412 Fixes #391 Fixes #176
1 parent 6719429 commit 2ff3a61

File tree

4 files changed

+6
-3
lines changed

4 files changed

+6
-3
lines changed

.gitignore

+1
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ coverage/
66

77
# Bundles
88
dist/
9+
examples/browser/media-stream-library.min.js
910

1011
# Cypress
1112
cypress/videos/

examples/browser/media-stream-library.min.js

-1
This file was deleted.

package.json

+2-2
Original file line numberDiff line numberDiff line change
@@ -26,12 +26,12 @@
2626
"build:esm": "tsc -p tsconfig.json",
2727
"build:cjs": "tsc -p tsconfig.cjs.json",
2828
"build:es5": "tsc -p tsconfig.es5.json",
29-
"build:bundle": "webpack",
29+
"build:bundle": "webpack && sbin/copyMinified.sh",
3030
"eslint": "eslint --ext '.ts,.js' lib/",
3131
"prettier:check": "prettier --check '{lib,examples}/**/*.{ts,js}'",
3232
"prettier:fix": "prettier --write '{lib,examples}/**/*.{ts,js}' --fix --loglevel silent",
3333
"rtsp": "rtsp-ws-server/start.sh",
34-
"examples": "http-server examples/browser",
34+
"examples": "yarn build && http-server examples/browser",
3535
"dev": "node sbin/dev.js",
3636
"release": "sbin/release.sh"
3737
},

sbin/copyMinified.sh

+3
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
#!/usr/bin/env bash
2+
3+
cp dist/media-stream-library.min.js examples/browser/media-stream-library.min.js

0 commit comments

Comments
 (0)