-
Notifications
You must be signed in to change notification settings - Fork 79
Development
CIRC is written in a language called CoffeeScript. CoffeeScript is the beautiful meeting of JavaScript's object model and Python-like syntax. The language compiles into vanilla JavaScript so it can be used in conjunction with JavaScript libraries like jQuery. You can learn more here: http://coffeescript.org/.
- Install CoffeeScript. Directions can be found here: http://coffeescript.org/.
- Clone the git repo.
- Run "make" in the root directory.
- Load the root directly as an unpacked Chrome extension (have to check the "developer mode" checkbox in chrome://extensions).
After you make a change, first run "make" to recompile the project, then reload the app. The easiest way to reload the app is to refresh the chrome://extensions page.
If you're having trouble understanding the CoffeeScript codebase, be sure to check out the class diagram as well as the compiled JavaScript code which lives in the bin/ folder after you run make.
CIRC uses jasmine for its unit tests. The tests are written in CoffeeScript and look like this:
describe "A notice", ->
it "is initially hidden", ->
expect(notice.isVisible()).toBe false
it "becomes visible after prompt() is called", ->
notice.prompt "Device detected"
expect(notice.isVisible()).toBe true
it "can be manually closed with close()", ->
notice.prompt "Device detected"
notice.close()
expect(notice.isVisible()).toBe false
Tests can be found in the /test directory.
To run CIRC tests, run make test
then navigate to file:///path_to_circ/bin/test_runner.html in Chrome.