~bcsaller/juju-gui/update-reductions

« back to all changes in this revision

Viewing changes to Makefile

  • Committer: Gary Poster
  • Date: 2012-09-21 06:05:22 UTC
  • mfrom: (105.1.3 closurelint)
  • Revision ID: gary.poster@canonical.com-20120921060522-u2h10i1avo7lqhws
use google closure linter for whitespace, tighten up other linter, and make broad changes to code to accommodate these changes.  Use `make prep` to beautify and lint your code, or `make` to beautify, lint, and test.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
all: test
2
 
 
3
 
install:
 
1
FILES=$(shell bzr ls -RV -k file | grep -v assets/ | grep -v app/templates.js | grep -v server.js)
 
2
NODE_TARGETS=node_modules/chai node_modules/d3 node_modules/jshint \
 
3
        node_modules/yui
 
4
TEMPLATE_TARGETS=app/templates/charm-collection.handlebars \
 
5
        app/templates/notifications_overview.handlebars \
 
6
        app/templates/service-constraints.handlebars \
 
7
        app/templates/service-relations.handlebars app/templates/charm.handlebars \
 
8
        app/templates/overview.handlebars app/templates/service.handlebars \
 
9
        app/templates/unit.handlebars app/templates/notifications.handlebars \
 
10
        app/templates/service-config.handlebars \
 
11
        app/templates/service-header.partial
 
12
 
 
13
all: prep test
 
14
 
 
15
app/templates.js: $(TEMPLATE_TARGETS) bin/generateTemplates
 
16
        @./bin/generateTemplates
 
17
 
 
18
$(NODE_TARGETS): package.json
4
19
        @npm install
5
20
        @#link depends
6
21
        @ln -sf `pwd`/node_modules/yui ./app/assets/javascripts/
7
22
        @ln -sf `pwd`/node_modules/d3/d3.v2* ./app/assets/javascripts/
8
 
        @./bin/generateTemplates
9
 
 
10
 
lint: install
11
 
        @node_modules/jshint/bin/hint --config=jshint.config `bzr ls -RV -k file | grep -v assets/ | grep -v app/templates.js`
 
23
 
 
24
install: $(NODE_TARGETS) app/templates.js
 
25
 
 
26
lint: virtualenv/bin/gjslint node_modules/jshint
 
27
        @virtualenv/bin/gjslint --strict --nojsdoc --custom_jsdoc_tags=property,default,since --jslint_error=all $(FILES)
 
28
        @node_modules/jshint/bin/hint --config=jshint.config $(FILES)
 
29
 
 
30
virtualenv/bin/gjslint virtualenv/bin/fixjsstyle:
 
31
        @virtualenv virtualenv
 
32
        @virtualenv/bin/easy_install archives/closure_linter-latest.tar.gz
 
33
 
 
34
beautify: virtualenv/bin/fixjsstyle
 
35
        @virtualenv/bin/fixjsstyle --strict --nojsdoc --jslint_error=all $(FILES)
 
36
 
 
37
prep: beautify lint
12
38
 
13
39
test: install
14
40
        @./test-server.sh
18
44
        @node server.js
19
45
 
20
46
clean:
21
 
        @rm -rf node_modules
 
47
        @rm -rf node_modules virtualenv
22
48
        @make -C docs clean
23
49
 
24
 
.PHONY: test lint server
 
50
.PHONY: test lint beautify server install clean prep