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