summaryrefslogtreecommitdiffstats
path: root/polygerrit-ui/app/polylint_test.sh
blob: ee69ce2aa81e9c93b5acaf49a29022864411b73a (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
#!/bin/bash

set -ex

npm_bin=$(which npm)
if [[ -z "$npm_bin" ]]; then
    echo "NPM must be on the path."
    exit 1
fi

polylint_bin=$(which polylint)
if [[ -z "$polylint_bin" ]]; then
    echo "You must install polylint and its dependencies from NPM."
    echo "> npm install -g polylint"
    exit 1
fi

unzip -o polygerrit-ui/polygerrit_components.bower_components.zip -d polygerrit-ui/app

${polylint_bin} --root polygerrit-ui/app --input elements/gr-app.html --b 'bower_components'