Downport "Simplify installing / running polylint"
Install it locally (to avoid version clashes) and then run it with npx (which finds the locally installed package even when it's not on the path). Change-Id: Ib0a6a57d373ada0b22d2030053ac696845059bc6
This commit is contained in:
committed by
Thomas Draebing
parent
3665d2b190
commit
ae106df68e
@@ -8,13 +8,13 @@ if [[ -z "$npm_bin" ]]; then
|
||||
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"
|
||||
npx_bin=$(which npx)
|
||||
if [[ -z "$npx_bin" ]]; then
|
||||
echo "NPX must be on the path."
|
||||
echo "> npm i -g npx"
|
||||
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'
|
||||
npx polylint --root polygerrit-ui/app --input elements/gr-app.html --b 'bower_components' --verbose
|
||||
|
||||
Reference in New Issue
Block a user