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