X-Git-Url: https://adrianiainlam.tk/git/?a=blobdiff_plain;f=scripts%2Fbuild.sh;h=ebdd1d42551bfec912e91b5af3bfb4da9f3228f0;hb=00eebc92ec7d1846599bf233dbc63b9ea3ac3095;hp=35159e4aaee802d5cd472c524b38cd54a2448844;hpb=627e054d1d77a0a8b02ed684b4105c5beafbc52a;p=dygraphs.git diff --git a/scripts/build.sh b/scripts/build.sh index 35159e4..ebdd1d4 100755 --- a/scripts/build.sh +++ b/scripts/build.sh @@ -1,9 +1,6 @@ #!/bin/bash -# This generates: -# - dist/dygraph.js -# - dist/dygraph.js.map -# - dist/dygraph.min.js -# - dist/dygraph.min.js.map +# This generates everything under dist: +# bundled JS, minified JS, minified CSS and source maps. set -o errexit mkdir -p dist @@ -45,12 +42,16 @@ uglifyjs --compress --mangle \ -o dist/dygraph.min.js \ dist/dygraph.tmp.js -# Copy to the old location -cp dist/dygraph.min.js dist/dygraph-combined.js - # Build GWT JAR jar -cf dist/dygraph-gwt.jar -C gwt org +# Minify CSS +cp css/dygraph.css dist/ +cleancss css/dygraph.css -o dist/dygraph.min.css --source-map --source-map-inline-sources + +# Build ES5-compatible distribution +babel src -d src-es5 --compact false + # Remove temp files. rm dist/dygraph.tmp.js rm dist/dygraph.tmp.js.map