| OLD | NEW |
| (Empty) | |
| 1 # Contributing |
| 2 |
| 3 Want to contribute to webcomponents.js? Great! |
| 4 |
| 5 We are more than happy to accept external contributions to the project in the fo
rm of [bug reports](../../issues) and pull requests. |
| 6 |
| 7 ## Contributor License Agreement |
| 8 |
| 9 Before we can accept patches, there's a quick web form you need to fill out. |
| 10 |
| 11 - If you're contributing as an individual (e.g. you own the intellectual propert
y), fill out [this form](http://code.google.com/legal/individual-cla-v1.0.html). |
| 12 - If you're contributing under a company, fill out [this form](http://code.googl
e.com/legal/corporate-cla-v1.0.html) instead. |
| 13 |
| 14 This CLA asserts that contributions are owned by you and that we can license all
work under our [license](LICENSE). |
| 15 |
| 16 Other projects require a similar agreement: jQuery, Firefox, Apache, Node, and m
any more. |
| 17 |
| 18 [More about CLAs](https://www.google.com/search?q=Contributor%20License%20Agreem
ent) |
| 19 |
| 20 ## Initial setup |
| 21 |
| 22 1. Setup Gulp: `sudo npm install -g gulp` |
| 23 1. Fork the project on github and pull down your copy. |
| 24 > replace the {{ username }} with your username and {{ repository }} with the
repository name |
| 25 |
| 26 git clone git@github.com:{{ username }}/{{ repository }}.git |
| 27 |
| 28 1. Test your change results in a working build. |
| 29 > in the repo you've made changes to, try generating a build: |
| 30 |
| 31 cd $REPO |
| 32 npm install |
| 33 gulp build |
| 34 |
| 35 The builds will be placed into the `dist/` directory if all goes well. |
| 36 |
| 37 1. Commit your code and make a pull request. |
| 38 |
| 39 That's it for the one time setup. Now you're ready to make a change. |
| 40 |
| 41 ## Submitting a pull request |
| 42 |
| 43 We iterate fast! To avoid potential merge conflicts, it's a good idea to pull fr
om the main project before making a change and submitting a pull request. The ea
siest way to do this is setup a remote called `upstream` and do a pull before wo
rking on a change: |
| 44 |
| 45 git remote add upstream git://github.com/polymer/webcomponentsjs.git |
| 46 |
| 47 Then before making a change, do a pull from the upstream `master` branch: |
| 48 |
| 49 git pull upstream master |
| 50 |
| 51 To make life easier, add a "pull upstream" alias in your `.gitconfig`: |
| 52 |
| 53 [alias] |
| 54 pu = !"git fetch origin -v; git fetch upstream -v; git merge upstream/mast
er" |
| 55 |
| 56 That will pull in changes from your forked repo, the main (upstream) repo, and m
erge the two. Then it's just a matter of running `git pu` before a change and pu
shing to your repo: |
| 57 |
| 58 git checkout master |
| 59 git pu |
| 60 # make change |
| 61 git commit -a -m 'Awesome things.' |
| 62 git push |
| 63 |
| 64 Lastly, don't forget to submit the pull request. |
| OLD | NEW |