HowToCook/build.sh

29 lines
777 B
Bash
Raw Normal View History

2022-03-05 01:40:45 +08:00
#!/bin/bash
set -e
# Requires: Ruby, node, python
2022-03-11 17:45:16 +08:00
tput setaf 2; echo "Cleaning up..."; tput sgr0
2022-03-07 03:11:28 +08:00
rm ./node_modules -rf
2022-03-11 17:45:16 +08:00
tput setaf 2; echo "Generating new readme and mkdocs"; tput sgr0
2022-03-05 01:40:45 +08:00
node ./.github/readme-generate.js
2022-03-11 17:45:16 +08:00
tput setaf 2; echo "Running markdown lint to check issues."; tput sgr0
markdownlint ./dishes ./tips
2022-03-05 01:40:45 +08:00
2022-03-11 17:45:16 +08:00
tput setaf 2; echo "Installing python requirements..."; tput sgr0
2023-10-15 18:51:05 +08:00
pip install -r requirements.txt --break-system-packages
2022-03-05 01:40:45 +08:00
2022-03-11 17:45:16 +08:00
tput setaf 2; echo "Builidng mkdocs and checking links..."; tput sgr0
2022-03-05 01:40:45 +08:00
mkdocs build --strict
2022-03-11 17:45:16 +08:00
tput setaf 2; echo "Installing textlint"; tput sgr0
2022-03-05 01:40:45 +08:00
npm install
2022-03-11 17:45:16 +08:00
tput setaf 2; echo "Running textlint..."; tput sgr0
./node_modules/.bin/textlint . --fix
2022-03-12 16:25:47 +08:00
tput setaf 2; echo "Manual rule linting..."; tput sgr0
node .github/manual_lint.js