Skip to content

Commit

Permalink
Add version to minified build target
Browse files Browse the repository at this point in the history
  • Loading branch information
danvk committed Nov 23, 2015
1 parent f0912fb commit 177329c
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions scripts/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,12 @@ browserify \
# Create dist/pileup.js.map
cat dist/pileup.js | exorcist --base . dist/pileup.js.map > /dev/null

version=$(grep '"version": ' package.json | sed 's/.*: "//; s/".*//')
header="/*! pileup v$version | (c) 2015 HammerLab | Apache-2.0 licensed */"

# Create dist/pileup.js.min{,.map}
uglifyjs --compress --mangle \
--preamble "$header" \
--in-source-map dist/pileup.js.map \
--source-map-include-sources \
--source-map dist/pileup.min.js.map \
Expand Down

0 comments on commit 177329c

Please sign in to comment.