2017-12-02 23:59:03 +00:00
|
|
|
#!/bin/bash
|
|
|
|
|
2017-12-03 00:08:21 +00:00
|
|
|
# USAGE: ./run.sh ( install | test_ludochaordic )
|
2017-12-02 23:59:03 +00:00
|
|
|
|
|
|
|
set -o pipefail -o errexit -o nounset -o xtrace
|
|
|
|
|
|
|
|
install () {
|
2017-12-03 00:08:21 +00:00
|
|
|
npm install -g eslint eslint-config-strict eslint-plugin-filenames
|
|
|
|
pip install pre-commit
|
2017-12-02 23:59:03 +00:00
|
|
|
pre-commit install
|
|
|
|
}
|
|
|
|
|
|
|
|
test_ludochaordic () {
|
|
|
|
cd ..
|
|
|
|
git clone https://github.com/getpelican/pelican-plugins.git
|
|
|
|
cd pelican-plugins
|
|
|
|
git submodule update --init image_process representative_image tag_cloud
|
|
|
|
|
|
|
|
cd ..
|
|
|
|
git clone https://github.com/Lucas-C/ludochaordic.git
|
|
|
|
cd ludochaordic
|
|
|
|
|
2017-12-03 16:26:55 +00:00
|
|
|
npm install -g csslint htmlhint lighthouse
|
2017-12-03 00:08:21 +00:00
|
|
|
pip install pelican markdown beautifulsoup4 pillow html5lib html5validator
|
|
|
|
|
2017-12-03 00:03:01 +00:00
|
|
|
../pelican-mg/gen_imgs_from_mds.py content/*.md
|
2017-12-02 23:59:03 +00:00
|
|
|
make DEBUG=1 OUTPUTDIR=output html
|
|
|
|
|
2017-12-03 16:26:55 +00:00
|
|
|
csslint --ignore=bulletproof-font-face,fallback-colors,order-alphabetical output/theme/css/main.css
|
2017-12-02 23:59:03 +00:00
|
|
|
|
2017-12-03 16:26:55 +00:00
|
|
|
html5validator --root output/ \
|
|
|
|
--ignore='Element "style" not allowed as child of element "div" in this context.'
|
|
|
|
cp .htmlhintrc output/
|
2017-12-02 23:59:03 +00:00
|
|
|
htmlhint output/
|
|
|
|
|
|
|
|
make devserver
|
2017-12-03 16:26:55 +00:00
|
|
|
lighthouse http://localhost:8000
|
2017-12-02 23:59:03 +00:00
|
|
|
make stopserver
|
|
|
|
}
|
|
|
|
|
|
|
|
eval "$1"
|