hexo/node_modules/ajv/scripts/prepare-tests

13 lines
343 B
Bash

#!/usr/bin/env sh
set -e
mkdir -p .browser
echo
echo Preparing browser tests:
find spec -type f -name '*.spec.*s' | \
xargs -I {} sh -c \
'export f="{}"; echo $f; ./node_modules/.bin/browserify $f -p [ tsify -p ./spec/tsconfig.json ] -x ajv -u buffer -o $(echo $f | sed -e "s/spec/.browser/" | sed -e "s/.spec.ts/.spec.js/");'