Skip to content
chaosmail edited this page Jan 3, 2016 · 2 revisions

Development

n3-line-charts is an AngularJS directive written in Typescript on top of D3.js. We use Gulp for running the build tasks, Karma for unit testing and Protractor for integration testing. All our tests are also written in Typescript.

Getting Started

Fetch the repo :

$ git clone https://github.com/n3-charts/line-chart.git

Install dev dependencies :

$ npm install

Install the type definitions :

$ tsd reinstall -s

Watch :

$ gulp watch

Or just build :

$ gulp

Run the integration tests :

$ gulp test:e2e

Run the demo (http://localhost:1234/test/e2e) :

$ gulp demo

My First Contribution

Please make sure that your feature or fix has already been discussed in the issue section before submitting a PR, so we can make sure the PR is going to be awesome (and accepted).

During the following steps, I will assume that your GitHub user is called chaosmail. Please replace chaosmail with your GitHub user name.

TL:DR

  1. fork this repo on GitHub
  2. git clone git@github.com:chaosmail/line-chart.git
  3. cd line-chart
  4. git remote add upstream git@github.com:n3-charts/line-chart.git
  5. npm install
  6. bower install
  7. git checkout -b feat/awesome-feature or git checkout -b fix/nasty-bug
  8. Code your feature, fix the bug, write tests
  9. grunt
  10. git commit -a -m "Fixed the nasty bug"
  11. git push -u origin feat/awesome-feature
  12. Create a PR on GitHub with the feature/bug description and the text "Fixes #999" or "Reolves #999" in it - where 999 is the issue number; create a CodePen or Plunker to show the new feature
  13. Submit the PR for review
  14. Wait for our comments; if everything is fine jump to 34.
  15. Adjust your code so that everyone is happy
  16. grunt
  17. git commit -a -m "Hope everyone is happy"
  18. git push
  19. If there are new comments and remarks go back to 15.
  20. If there have been no changes on the master branch in the original repo jump to 29.
  21. git checkout master
  22. git fetch upstream
  23. git rebase upstream/master
  24. git checkout -b feat/awesome-feature
  25. git rebase master
  26. grunt
  27. git add build
  28. git rebase --continue
  29. If you made just a single commit jump to 34.
  30. git merge-base feat/awesome-feature master
  31. git rebase -i ${HASH} replace ${HASH} with the merge-base hash from the previous command
  32. pick first commit, and squash the other commits by replacing pick with squash
  33. git push -f
  34. Wait until we merge the PR into the master branch
  35. Relax and get a beer, you have done an awesome job

Clone this wiki locally