-
-
Save ecordell/1a9f9ec14136a8fb1bde to your computer and use it in GitHub Desktop.
Wrapper script for Dredd
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env bash | |
set -e | |
export BASE_URL=${BASE_URL:-http://example.com} | |
babel hooks --out-dir compiled-hooks --source-maps inline | |
# Handle passing in specific file patterns | |
if [[ $# == 0 ]] || [[ $1 == -* ]]; then | |
export PARTS="parts/**/*" | |
else | |
export PARTS="$1" | |
shift | |
fi | |
dredd $PARTS "$BASE_URL" \ | |
--sorted --inline-errors \ | |
--hookfiles=./compiled-hooks/**/*_hooks.js |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment