Skip to content

Instantly share code, notes, and snippets.

@ecordell
Created March 2, 2016 15:47
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ecordell/1a9f9ec14136a8fb1bde to your computer and use it in GitHub Desktop.
Save ecordell/1a9f9ec14136a8fb1bde to your computer and use it in GitHub Desktop.
Wrapper script for Dredd
#!/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