• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1# INSTALLING NPM/BOWER
2
3The version of npm in apt-get is too old for bower. Instead
4install it from http://nodejs.org/download/.
5
6Install bower with:
7
8    $ npm install -g bower
9
10# SYNCING DEPENDENCIES
11
12The makefile will update dependencies, including polymer components and testing libraries:
13
14    $ make update
15
16This just checks for npm and bower, and then runs:
17
18    $ bower update
19    $ npm install
20
21# RUNNING SHERIFF-O-MATIC
22
23sheriff-o-matic must be run from a server in order to handle polymer imports correctly.
24
25    $ cd Tools/GardeningServer
26    $ python -m SimpleHTTPServer
27
28Then load: http://localhost:8000/sheriff-o-matic.html
29
30# TESTING
31
32The tests can be run in the browser or from the command line.
33
34In the browser: http://localhost:8000/test/run-unit-tests.html
35
36From the command line:
37
38    $ cd Tools/GardeningServer
39    $ make test
40
41This will launch karma, run the tests and watch the source files for changes. To run once and exit, use:
42
43    $ make single-test
44
45Or, you can start karma manually:
46
47    $ cd Tools/GardeningServer
48    $ ./node_modules/karma/bin/karma start
49
50You can shorten this command to 'karma start' if you run 'npm install -g karma-cli'.
51
52# PUSHING
53
54In GardeningServer:
55
561. make update
572. appcfg.py update . --version r$(git svn find-rev HEAD) --oauth2
583. Go to appengine.google.com and select the sheriff-o-matic app.
594. Click on the version tab
605. Make the rXXXX version the default, where XXXX is:
61   git svn find-rev HEAD
62
63The versioning is so that we can easily roll back if there's something
64wrong with the push and so we can know what we've pushed.
65
66If you're unsure about whether you might have broken things, before
67step 4, you can click on the link for that version to see that
68version of the server before you make it the default.
69
70# LIBRARIES
71
72sugar: Provides generic syntactic sugar for JavaScript, mostly by extending native object prototypes.
73
74karma: test runner. Runs the unit tests in an instance of Chrome and pipes the results to the command
75       line. By default, it watches for changes to files and will automatically re-run the tests. To run
76       once and exit, use 'karma start --single-run' or 'make single-test'.
77
78mocha: testing framework. Provides good asynchronous and synchronous test support. Tests run serially,
79       so exceptions are reported for the right test case.
80
81chai:  assertion library.
82