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: I65e35042ae49b9fb0bbe6fd6fba723f8edda8584
		
			
				
	
	
		
			21 lines
		
	
	
		
			438 B
		
	
	
	
		
			Bash
		
	
	
		
			Executable File
		
	
	
	
	
			
		
		
	
	
			21 lines
		
	
	
		
			438 B
		
	
	
	
		
			Bash
		
	
	
		
			Executable File
		
	
	
	
	
#!/bin/bash
 | 
						|
 | 
						|
set -ex
 | 
						|
 | 
						|
npm_bin=$(which npm)
 | 
						|
if [[ -z "$npm_bin" ]]; then
 | 
						|
    echo "NPM must be on the path."
 | 
						|
    exit 1
 | 
						|
fi
 | 
						|
 | 
						|
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
 | 
						|
 | 
						|
npx polylint --root polygerrit-ui/app --input elements/gr-app.html --b 'bower_components' --verbose
 |