Merge pull request #449 from gregoryjordan/master
authorDan Vanderkam <danvdk@gmail.com>
Fri, 24 Oct 2014 20:55:11 +0000 (16:55 -0400)
committerDan Vanderkam <danvdk@gmail.com>
Fri, 24 Oct 2014 20:55:11 +0000 (16:55 -0400)
Fix ghosting issues when viewing graphs with browser zoomed out.

CONTRIBUTING.md [new file with mode: 0644]
Makefile
bower.json
check-combined-unaffected.sh [new file with mode: 0755]
release.sh

diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md
new file mode 100644 (file)
index 0000000..3b5598b
--- /dev/null
@@ -0,0 +1,21 @@
+Filing a bug report? Please include the following:
+
+1. Link to a page which demonstrates the problem, preferably a jsfiddle (use [this jsfiddle](http://dygraphs.com/fiddle) as a template)
+2. Browser and Operating System that exhibit the problem
+
+It also helps if you include the non-compacted version of the JS on your
+page. For instance, instead of doing this:
+
+```html
+<script type="text/javascript" src="dygraph-combined.js"></script>
+```
+
+do this:
+
+```html
+<script type="text/javascript" src="dygraph-dev.js"></script>
+```
+
+This makes error messages and debugging simpler. The jsfiddle does this automatically.
+
+Sending a Pull Request? See our [guide to making dygraphs contributions](http://dygraphs.com/changes.html).
index 18522df..2047c7f 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -28,6 +28,7 @@ generate-gwt:
 
 test:
        @./test.sh
+       @./check-combined-unaffected.sh
 
 test-combined: move-combined test clean-combined-test
 
index 081e156..4aa054d 100644 (file)
@@ -1,6 +1,6 @@
 {
   "name": "dygraphs",
-  "version": "v1.0.1-bower",
+  "version": "v1.0.1+bower",
   "main": "dygraph-combined.js",
   "ignore": [
     "Makefile",
@@ -32,7 +32,7 @@
     "package.json",
     "phantom-driver.js",
     "phantom-perf.js",
-    "push-to-web.sh"
+    "push-to-web.sh",
     "release.sh",
     "releases.json",
     "screenshot.png",
@@ -40,6 +40,6 @@
     "test.sh",
     "tests",
     "thumbnail.png",
-    "yuicompressor-2.4.2.jar",
+    "yuicompressor-2.4.2.jar"
   ]
 }
diff --git a/check-combined-unaffected.sh b/check-combined-unaffected.sh
new file mode 100755 (executable)
index 0000000..de1721e
--- /dev/null
@@ -0,0 +1,15 @@
+#!/bin/bash
+# Ensures that dygraph-combined.js is unaffected.
+# Helpful for pull requests, where this is a common mistake.
+
+grep 'var' dygraph-combined.js > /dev/null
+if [ $? -eq 0 ]; then
+  echo 'Please revert changes to dygraph-combined.js' >&2
+  echo 'You can do this by running:  ' >& 2
+  echo '' >& 2
+  echo '    git checkout dygraph-combined.js' >&2
+  echo '' >& 2
+  exit 1
+fi
+
+exit 0
index 01089e4..909e109 100755 (executable)
@@ -26,6 +26,18 @@ if [ $? -ne 0 ]; then
   exit 1
 fi
 
+grep "$VERSION" package.json
+if [ $? -ne 0 ]; then
+  echo "Version in package.json doesn't match command line argument." >&2
+  exit 1
+fi
+
+grep "v$VERSION" bower.json
+if [ $? -ne 0 ]; then
+  echo "Version in bower.json doesn't match command line argument." >&2
+  exit 1
+fi
+
 make lint test test-combined
 if [ $? -ne 0 ]; then
   echo "Tests failed. Won't release!" >&2