mirror of
https://github.com/danog/sass-site.git
synced 2024-11-27 04:24:50 +01:00
35 lines
702 B
Bash
35 lines
702 B
Bash
|
#!/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
|
||
|
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
|