mirror of
https://github.com/video-dev/hls.js.git
synced 2026-05-17 13:30:38 +00:00
489e9419ce
* add a script that will deploy the `netlify` dir to cloudflare pages * switch everything from netlify over to cf pages * fix wrangler version * add `/` to api-docs url * fix name of cloudflare dev project
20 lines
434 B
Bash
Executable File
20 lines
434 B
Bash
Executable File
#!/bin/bash
|
|
set -e
|
|
|
|
root="./cloudflare-pages"
|
|
|
|
rm -rf "$root"
|
|
mkdir "$root"
|
|
|
|
echo "Building for CloudFlare..."
|
|
|
|
# redirect / to /demo
|
|
echo "/ /demo" > "$root/_redirects"
|
|
echo "/api-docs/ /api-docs/hls.js.hls.html" >> "$root/_redirects"
|
|
echo "/api-docs/index.html /api-docs/hls.js.hls.html" >> "$root/_redirects"
|
|
cp -r "./dist" "$root/dist"
|
|
cp -r "./demo" "$root/demo"
|
|
cp -r "./api-docs" "$root/api-docs"
|
|
|
|
echo "Built for CloudFlare."
|