Generate minified CSS
authorDan Vanderkam <danvk@sidewalklabs.com>
Wed, 28 Dec 2016 17:52:20 +0000 (12:52 -0500)
committerDan Vanderkam <danvk@sidewalklabs.com>
Wed, 28 Dec 2016 17:52:20 +0000 (12:52 -0500)
package.json
scripts/build.sh
scripts/push-to-web.sh

index c5a8d0b..508b714 100644 (file)
@@ -32,6 +32,7 @@
     "browserify": "^11.2.0",
     "browserify-header": "^0.9.2",
     "chai": "^3.3.0",
+    "clean-css": "^3.4.23",
     "coveralls": "^2.11.2",
     "envify": "^3.4.0",
     "exorcist": "^0.4.0",
index 279597a..3122d03 100755 (executable)
@@ -48,6 +48,10 @@ uglifyjs --compress --mangle \
 # 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
+
 # Remove temp files.
 rm dist/dygraph.tmp.js
 rm dist/dygraph.tmp.js.map
index 7d062d4..29bf648 100755 (executable)
@@ -32,7 +32,7 @@ if [ -s docs/options.html ] ; then
   # Copy everything to the site.
   rsync -avzr src src/extras gallery common tests jsdoc $site \
   && \
-  rsync -avzr --copy-links dist/* css/* thumbnail.png screenshot.png $temp_dir/* $site/
+  rsync -avzr --copy-links dist/* thumbnail.png screenshot.png $temp_dir/* $site/
 else
   echo "generate-documentation.py failed"
 fi