Merge pull request #67 from kberg/master
[dygraphs.git] / docs / changes.html
1 <!DOCTYPE html>
2 <html>
3 <head>
4 <meta http-equiv="X-UA-Compatible" content="IE=EmulateIE7; IE=EmulateIE9">
5 <title>Guide to making dygraphs changes</title>
6 <style type="text/css">
7 code { white-space: pre; border: 1px dashed black; display: inline; }
8 pre { white-space: pre; border: 1px dashed black; }
9 body { max-width: 800px; }
10 ol > li { padding: 5px; }
11 </style>
12 </head>
13 <body>
14 <h2>Guide to making dygraphs changes</h2>
15
16 <p>So you've made a change to dygraphs and would like to contribute it back
17 to the open source project. Wonderful! This is a step-by-step guide
18 explaining how to do it.</p>
19
20 <p>The list of steps may look a bit daunting, but it's not too bad,
21 especially if you have any familiarity with git or github. If you run into
22 any problems while following the instructions, feel free to contact
23 dygraphs-users.</p>
24
25 <p>Why not just take patches? This process means less work for me (the
26 maintainer) and it also results in your name appearing in the list of
27 dygraphs commits. This lets you take credit for your work.</p>
28
29 <ol>
30 <li>Create an account on <a href="http://github.com">github</a>. This is
31 free, painless and will let you claim credit for your changes.
32
33 <li>Install git. github has a good writeup <a
34 href="http://help.github.com/git-installation-redirect">here</a>.
35
36 <li>Create a fork of the dygraphs repository on github by
37 clicking <a href="https://github.com/danvk/dygraphs">this link</a> and
38 then the "Fork" button.
39
40 <li>You should see a URL along the lines of
41 <code>git@github.com:yourname/dygraphs.git</code><br/>Copy this, open up a
42 terminal and run<br/>
43 <pre>git clone git@github.com:yourname/dygraphs.git</pre> This
44 pulls the dygraphs code down onto your local disk.
45
46 <li>cd into the dygraphs directory and make your changes.<br/>
47 If you've already got them somewhere else, just copy them over.<br/>
48 I try to adhere to Google's <a
49 href="http://google-styleguide.googlecode.com/svn/trunk/javascriptguide.xml">
50 JS style guide</a> and would appreciate it if you try to as well.
51
52 <li>Be a good citizen!
53 <ul>
54 <li>If you've added a new feature, add a test for it (in the tests/
55 directory).
56 <li>If you've added a new option, add it to the list of options on the
57 documentation page (docs/index.html).
58 </ul>
59 You'll have to do this before I accept your changes, so you may as well
60 do it now
61
62 <li>Commit your changes locally: run
63 <pre>git add .
64 git commit</pre>
65 Type in a description of your change. This will
66 eventually appear in the dygraphs <a
67 href="https://github.com/danvk/dygraphs/commits/master">commit list</a>.
68
69 <li>Push your changes to github by running <pre>git push</pre>This will
70 send your changes to your forked repository on github.
71
72 <li>Go to your fork of dygraphs on github (i.e.
73 github.com/yourname/dygraphs).<br/>
74 Click the "Pull Request" button.<br/>
75 This will send me an email with a pointer to your changes.
76
77 <li>I'll review your changes and (unless your code is perfect!) give you
78 some feedback. Make these suggested changes in your local git client and
79 re-run "git commit" and "git push" so that I can see them.
80
81 <li>Once your change is ready, I'll pull it into the main dygraphs
82 repository and publish it to the web.
83 </ol>
84
85 <!-- Google Analytics -->
86 <script type="text/javascript">
87 var _gaq = _gaq || [];
88 _gaq.push(['_setAccount', 'UA-769809-2']);
89 _gaq.push(['_trackPageview']);
90 (function() {
91 var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
92 ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
93 var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
94 })();
95 </script>
96 </body>
97 </html>