do this before pushing to make sure everything is fine.
Run tasks test
, lint:fix
, and documentation
after this.
lints everything that can be linted
Run tasks lint:html
, lint:css
, and lint:js
after this.
Lints everything that can be linted. Fixes everything that can be fixed.
Run tasks lint:html
, lint:css:fix
, and lint:js:fix
after this.
lints index.html
htmllint index.html --rc config/htmllint.json
lints all css files in blocks subdirectories
stylelint blocks/**/*.css --config config/stylelint.json
lints all css files in blocks subdirectories and tries to fix problems
stylelint blocks/**/*.css --config config/stylelint.json --fix
lints all files in the js directory
eslint js/**/*.js blocks/**/*.js -c config/eslint.json
lints all files in the js directory and tries to fix problems
eslint js/**/*.js blocks/**/*.js -c config/eslint.json --fix
creates documentation and pushes it to the wiki. Only works in Travis CI.
Run tasks documentation:clonegit
, documentation:generate
, and documentation:push
after this.
creates documentation for all files in the js directory
DOCS="# API documentation \n## JavaScript modules \n"
for F in $(find js/ -type f); do
DIR=$(dirname "$F")
mkdir -p docs/${DIR}/;
jsdoc2md "$F" > "docs/${F}.md"
DOCS+="* [${F}](/${F}.md) \n"
done
echo -e "${DOCS}" | tee "docs/Home.md" >/dev/null
initialize git repository of the documentation so that changes can be commited later on
if [ ! -d docs ]; then
mkdir -p docs;
fi
cd docs
git config --global user.name "deployment script via Travis CI"
git clone https://${GH_TOKEN}@github.com/goldst/ein-web.wiki.git .
cd ..
push changes to the wiki. Only works in travis.
cd docs
git add .
git commit -m "Travis CI deployment: documentation update for build $TRAVIS_BUILD_NUMBER"
git push -u origin master
generates and runs js tests for the js directory
Run tasks test:generate
, and test:run
after this.
generates tests for the js directory
ALL=""
for F in $(find js/ -type f); do
DIR=$(dirname "${F}")
mkdir -p test/${DIR}/;
node jsdocexample2mochajs/bin "${F}" > "test/${F}.test.js"
ALL+="require('./${F}.test.js');\n"
done
echo -e "${ALL}" | tee "test/test.js" >/dev/null
Runs tests for js files. Only outputs errors.
mocha --require babel-core/register
runs tests for js files with outputs fur passing tests
mocha --require babel-core/register