On the server side
# command linenpm install endoxa-graph
On the client side
# command linebower install endoxa-graph
When you get dressed you have to do some things before others.
OK, so what order should you do it? Ask endoxa:
EndoxaGraphtoposortEndoxaGraphfromConnectionsList0 61 62 0 2 13 0 3 74 3 4 75 7;// -> [5, 4, 3, 7, 2, 1, 0, 6]
The first thing you will want to do is fork and clone this repo, and set the project up so you can run the tests.
# command line (use "sudo" if necessary)npm install# install grunt (use "sudo" if necessary)npm install -g grunt-cli
Now you should be able to run the tests. Just do this
If you just cloned the project then you should see all the tests pass. Now you're ready to contribute. Note that the code you write needs to conform to the JSHint conventions. To check your code, run
It will tell you how to fix any errors. We enforce this style so that the code stays consistent and easy to read.
- Adding more tests for existing algorithms. Tests live in the
test/directory. Look at the code inside to get an idea how to write new ones.
- Write tests for algorithms that haven't been implemented yet.
You'll want to copy one of the files like
test/dfs.jsand give it a name to match your algorithm. For instance, breadth-first search might go in
test/bfs.js. Because your test will fail (the algorithm has not been implemented yet) you should send a pull request to the
unimplemented_testsbranch, not the
masterbranch. We want to keep
- Write algorithms to implement tests. Create a branch off master,
cherry-pick a commit from
unimplemented_testswhich adds the test you want to implement, and write your code. When everything passes, send a pull request to master.
- Refactor an existing algorithm to use more beautiful and functional code. This is the whole point of Endoxa, this is where the magic happens. Make sure the tests still pass after your strokes of genius.