Files
commafeed-podcasts/bs/build
T
2026-05-22 15:56:44 +02:00

33 lines
637 B
Python
Executable File

#!/usr/bin/env bash
set -eo pipefail # this can be harmful, see https://www.youtube.com/watch?v=4Jo3Ml53kvc
. bs/.common || {
echo 'Please run this script from the project root directory' >&2;
exit 1;
}
# depends on
declare -r tsc='bs/dev/tsc'
declare -r assets='bs/dev/assets'
declare -r rollup='node_modules/.bin/rollup'
declare -r analyze='bs/analyze'
declare -r config='rollup.config.js'
declare -r dist='dist/'
help(){
if ! isHelp "${@}"; then return 0; fi
echoReadmeInfo
echo
$rollup --help
exit 0
}
main(){
help "${@}"
$tsc
$assets
rm -rf "$dist"
$rollup -c $config "${@}"
$analyze --exclude "$dist"
}
main "${@}"