-
Notifications
You must be signed in to change notification settings - Fork 79
Development
noahsug edited this page Dec 6, 2012
·
14 revisions
CIRC is written in a language called CoffeeScript. CoffeeScript is the beautiful meeting of JavaScript's object model and Python's syntax. The language compiles into vanilla JavaScript and so it can be used in conjunction with JavaScript libraries like jQuery. You can learn more information 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 (check the "developer mode" checkbox in chrome://extensions to see this option).
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.
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.