summaryrefslogtreecommitdiffstats
path: root/Makefile
diff options
context:
space:
mode:
authorDaniel Calviño Sánchez <danxuliu@gmail.com>2019-03-07 21:23:09 +0100
committerJoas Schilling <coding@schilljs.com>2019-03-27 10:36:31 +0100
commit06c160e4948f421cfb73d1c7a89248e38c82fa9e (patch)
tree62dc137b8d2be901c55407bd73d17f5b0dd02cea /Makefile
parent783e790e99053183b83f412713691971154749b0 (diff)
Add make step to bundle the custom SimpleWebRTC
Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com>
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile6
1 files changed, 6 insertions, 0 deletions
diff --git a/Makefile b/Makefile
index 1b769fcd5..9d21bbd9f 100644
--- a/Makefile
+++ b/Makefile
@@ -34,6 +34,12 @@ install-npm-deps-dev:
compile-handlebars-templates: dev-setup
bash compile-handlebars-templates.sh
+bundle-simplewebrtc: dev-setup
+ # webrtc-adapter uses JavaScript features not supported by browserify,
+ # so the sources need to be transformed using babel to a compatible
+ # version of JavaScript.
+ npx browserify --standalone SimpleWebRTC --transform [ babelify --global --presets [ @babel/env ] ] js/simplewebrtc/simplewebrtc.js > js/simplewebrtc/bundled.js
+
dev-setup: install-npm-deps-dev
appstore: clean install-deps