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

Commit

Permalink
Do not uglify when NO_UGLIFY is set. (#4271) (#4272)
Browse files Browse the repository at this point in the history
  • Loading branch information
chenba authored and jaredhirsch committed Mar 27, 2018
1 parent 8630e74 commit bb339f4
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
1 change: 1 addition & 0 deletions .env.dev
Original file line number Diff line number Diff line change
Expand Up @@ -15,5 +15,6 @@ ENABLE_ANNOTATIONS=true
SCREENSHOTS_UPLOAD_BINARY=true

export NODE_ICU_DATA="$(pwd)/node_modules/full-icu"
# For false, unset or set to empty string
export NO_UGLIFY=true
export NODE_ENV=dev
7 changes: 3 additions & 4 deletions bin/build-scripts/bundle_dependencies
Original file line number Diff line number Diff line change
Expand Up @@ -43,13 +43,12 @@ build() {
echo -n "bundle... "
NODE_ENV="${NODE_ENV:-production}" browserify \
-g [ envify --NODE_ENV $NODE_ENV ] \
$( [[ -z $NO_UGLIFY ]] && printf %s '-g uglifyify' ) \
-e "$@" \
| uglifyjs --compress --mangle > "$dest"
$( [[ -z "$NO_UGLIFY" ]] && printf %s '-g uglifyify' ) \
-e "$@" > "$dest"

if [[ -z "$NO_UGLIFY" ]] ; then
echo -n "minimizing... "
uglifyjs -c -o "$dest" "$dest"
uglifyjs --compress --mangle -o "$dest" "$dest"
fi
echo "done."
}
Expand Down

0 comments on commit bb339f4

Please sign in to comment.