Merge branch 'master' of https://github.com/danvk/dygraphs into i382
[dygraphs.git] / docs / changes.html
index e476377..12a9d52 100644 (file)
@@ -1,9 +1,22 @@
+<!DOCTYPE html>
 <html>
   <head>
-    <title>dygraphs input types</title>
+    <meta http-equiv="X-UA-Compatible" content="IE=EmulateIE7; IE=EmulateIE9">
+    <title>Guide to making dygraphs changes</title>
     <style type="text/css">
-      code { white-space: pre; border: 1px dashed black; display: inline; }
-      pre  { white-space: pre; border: 1px dashed black; }
+      code {
+        white-space: pre;
+        border: 1px dashed black;
+        display: inline-block;
+        margin-left: 5px;
+        margin-right: 5px;
+        padding: 2px;
+      }
+      pre  {
+        white-space: pre;
+        border: 1px dashed black;
+        padding: 5px;
+      }
       body { max-width: 800px; }
       ol > li { padding: 5px; }
     </style>
     <h2>Guide to making dygraphs changes</h2>
 
     <p>So you've made a change to dygraphs and would like to contribute it back
-    to the open source project. Wonderful! This is a step-by-step guide
-    explaining how to do it.</p>
+    to the open source project. Wonderful!</p>
+    
+    <p>This is a step-by-step guide explaining how to do it.</p>
+
+    <h3>dygraphs style</h3>
+    <p>First of all, please try to follow the style of the existing dygraphs
+    code. This will make the review process go much more smoothly.<p>
+
+    <p>A few salient points:</p>
+    <ol>
+      <li> I try to adhere to Google's <a
+        href="http://google-styleguide.googlecode.com/svn/trunk/javascriptguide.xml">
+        JS style guide</a> and would appreciate it if you try to as well. This
+      means:
+      <ul>
+        <li>No tabs! Indent using two spaces.
+        <li>Use camelCase for variable and function names.
+        <li>Limit lines to 80 characters.
+      </ul>
+
+      <li>Please run 'lint.sh' to see if you've introduced any new violations.
+
+      <li>If you've added a new feature, add a test for it (in the tests/
+      directory) or a gallery entry.
+
+      <li>If you've added an option, document it in
+      dygraph-options-reference.js. You'll get lots of warnings if you don't.
+
+      <li>If you've fixed a bug or added a feature, add an auto_test for
+      it.<br/>
+      This ensures that we won't inadvertently break your feature in the
+      future. To do this, either add to an existing auto_test in
+      auto_tests/tests or run
+      <code>auto_tests/misc/new-test.sh your-test-name</code> to
+      create a new one. There are two easy ways to run tests:
+      <ul>
+      <li>You can run your auto_test in any browser by visiting
+      <code>auto_tests/misc/local.html</code>. This allows you to debug your
+      test, or test against a specific browser.
+      <li>You can run your auto_test on the command-line by running
+      <code>./test.sh</code>. (It requires installing
+      <a href="http://phantomjs.org">phantomjs</a> on your computer.)
+      </ul>
+    </ol>
+
+    <h3>Sending a Pull Request</h3>
+
+    <p>dygraphs is hosted on github, which uses a "pull request" model. They
+    have a good writeup <a
+      href="http://help.github.com/send-pull-requests/">here</a>. These
+    instructions discuss dygraphs more specifically.</p>
 
     <p>The list of steps may look a bit daunting, but it's not too bad,
     especially if you have any familiarity with git or github. If you run into
 
       <li>cd into the dygraphs directory and make your changes.<br/>
       If you've already got them somewhere else, just copy them over.<br/>
-      I try to adhere to Google's <a
-        href="http://google-styleguide.googlecode.com/svn/trunk/javascriptguide.xml">
-        JS style guide</a> and would appreciate it if you try to as well.
-
-      <li>Be a good citizen!
-        <ul>
-          <li>If you've added a new feature, add a test for it (in the tests/
-          directory).
-          <li>If you've added a new option, add it to the list of options on the
-          documentation page (docs/index.html).
-        </ul>
+
+      <li>Be a good citizen! Make sure your code follows the guidelines
+      above.<br/>
         You'll have to do this before I accept your changes, so you may as well
         do it now
 
@@ -79,5 +133,17 @@ git commit</pre>
       <li>Once your change is ready, I'll pull it into the main dygraphs
       repository and publish it to the web.
     </ol>
+
+  <!-- Google Analytics -->
+<script type="text/javascript">
+  var _gaq = _gaq || [];
+  _gaq.push(['_setAccount', 'UA-769809-2']);
+  _gaq.push(['_trackPageview']);
+  (function() {
+    var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
+    ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
+    var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
+  })();
+</script>
   </body>
 </html>