HowToCook/build.sh

32 lines
887 B
Bash
Raw Normal View History

2022-03-04 17:40:45 +00:00
#!/bin/bash
set -e
# Requires: Ruby, node, python
2022-03-11 09:45:16 +00:00
tput setaf 2; echo "Cleaning up..."; tput sgr0
2022-03-06 19:11:28 +00:00
rm ./node_modules -rf
2022-03-11 09:45:16 +00:00
tput setaf 2; echo "Installing markdown lint"; tput sgr0
gem install mdl || sudo gem install mdl
2022-03-04 17:40:45 +00:00
2022-03-11 09:45:16 +00:00
tput setaf 2; echo "Generating new readme and mkdocs"; tput sgr0
2022-03-04 17:40:45 +00:00
node ./.github/readme-generate.js
2022-03-11 09:45:16 +00:00
tput setaf 2; echo "Running markdown lint to check issues."; tput sgr0
mdl ./dishes ./tips -r ~MD036,~MD024,~MD004,~MD029,~MD013,~MD007
2022-03-04 17:40:45 +00:00
2022-03-11 09:45:16 +00:00
tput setaf 2; echo "Installing python requirements..."; tput sgr0
2022-03-04 17:40:45 +00:00
pip install -r requirements.txt
2022-03-11 09:45:16 +00:00
tput setaf 2; echo "Builidng mkdocs and checking links..."; tput sgr0
2022-03-04 17:40:45 +00:00
mkdocs build --strict
2022-03-11 09:45:16 +00:00
tput setaf 2; echo "Installing textlint"; tput sgr0
2022-03-04 17:40:45 +00:00
npm install
2022-03-11 09:45:16 +00:00
tput setaf 2; echo "Running textlint..."; tput sgr0
./node_modules/.bin/textlint . --fix
2022-03-12 08:25:47 +00:00
tput setaf 2; echo "Manual rule linting..."; tput sgr0
node .github/manual_lint.js