Navigation Menu

Skip to content
This repository has been archived by the owner on Jan 17, 2023. It is now read-only.

Commit

Permalink
fail server build for imports out of build/ and node_modules/
Browse files Browse the repository at this point in the history
  • Loading branch information
Greg Guthe committed Sep 1, 2017
1 parent f0c59e9 commit 3586749
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions bin/build-scripts/bundle_dependencies
Expand Up @@ -33,6 +33,13 @@ build() {
mkdir -p "$(dirname "$(depfile)")"
echo -n "Building $(basename $dest): deps... "
browserify --list -e "$@" | sed "s!$(pwd)/!!g" | grep -v build-time > "$(depfile)"
if egrep -qv "^(build|node_modules)/" "$(depfile)" ; then
echo
echo "error: $@ or its deps import files outside build/ or node_modules/:"
egrep -v "^(build|node_modules)/" "$(depfile)"
echo "failed."
exit 2
fi
echo -n "bundle... "
NODE_ENV=production browserify -o "$dest" \
-g [ envify --NODE_ENV production ] \
Expand Down

0 comments on commit 3586749

Please sign in to comment.