package.json:
"scripts": { "test": "bash test.sh" }, test.sh:
#!/bin/bash for i in "$@" do case $i in -l=*|--lib=*) LIBPATH="${i#*=}" shift # past argument=value ;; --default) DEFAULT=YES shift # past argument with no value ;; *) # unknown option ;; esac done echo "LIBRARY PATH = ${LIBPATH}" Tried invoking: npm run test -l=/usr/lib, ain't working though.