mirror of
https://github.com/danog/sass-site.git
synced 2024-11-30 04:29:17 +01:00
36 lines
716 B
Bash
Executable File
36 lines
716 B
Bash
Executable File
#!/usr/bin/env bash
|
|
|
|
# Exit on error or pipe failure
|
|
set -eo pipefail
|
|
|
|
# Print each command and its arguments
|
|
set -x
|
|
|
|
# Clone and fetch the sass/sass repo
|
|
if [[ ! -d ".language" ]]; then
|
|
git clone https://github.com/sass/sass .language
|
|
fi
|
|
cd .language
|
|
git fetch
|
|
if [[ "$LANGUAGE_REVISION" ]]; then
|
|
git checkout "$LANGUAGE_REVISION"
|
|
else
|
|
git checkout origin/main
|
|
fi
|
|
git clean -fX
|
|
cd ..
|
|
|
|
# Build the JS API docs
|
|
cd .language
|
|
npm install
|
|
ln -sf ../.language/node_modules ../tool/node_modules
|
|
npm run typedoc -- \
|
|
--plugin ../tool/typedoc-theme.js --theme sass-site \
|
|
--out ../source/documentation/js-api \
|
|
--cleanOutputDir
|
|
cd ..
|
|
rm -r source/documentation/js-api/assets
|
|
|
|
# Turn off printing commands
|
|
set +x
|