Skip to content

Commit

Permalink
Update support files.
Browse files Browse the repository at this point in the history
  • Loading branch information
jaredhanson committed Aug 1, 2013
1 parent 80f8533 commit d1408bf
Show file tree
Hide file tree
Showing 12 changed files with 109 additions and 4 deletions.
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
build
reports

# Mac OS X
.DS_Store

Expand Down
20 changes: 20 additions & 0 deletions .jshintrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
{
"node": true,

"bitwise": true,
"camelcase": true,
"curly": true,
"forin": true,
"immed": true,
"latedef": true,
"newcap": true,
"noarg": true,
"noempty": true,
"nonew": true,
"quotmark": "single",
"undef": true,
"unused": true,
"trailing": true,

"laxcomma": true
}
5 changes: 4 additions & 1 deletion .npmignore
Original file line number Diff line number Diff line change
@@ -1,7 +1,10 @@
README.md
Makefile
doc/
build/
docs/
examples/
reports/
support/
test/

# Mac OS X
Expand Down
6 changes: 3 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -30,10 +30,10 @@
"mocha": "1.x.x",
"chai": "1.x.x"
},
"scripts": {
"test": "node_modules/.bin/mocha --reporter spec --require test/bootstrap/node test/*.test.js"
},
"engines": {
"node": ">= 0.4.0"
},
"scripts": {
"test": "node_modules/.bin/mocha --reporter spec --require test/bootstrap/node test/*.test.js"
}
}
10 changes: 10 additions & 0 deletions support/mk/browserify.mk
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
BROWSERIFY ?= browserify
BROWSERIFY_MAIN ?= index.js
BROWSERIFY_OUT ?= build/bundle.js

build-browserify: node_modules
mkdir -p build
$(BROWSERIFY) $(BROWSERIFY_MAIN) -o $(BROWSERIFY_OUT)


.PHONY: build-browserify
7 changes: 7 additions & 0 deletions support/mk/coveralls.mk
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
COVERALLS ?= coveralls

submit-istanbul-lcov-to-coveralls:
cat $(ISTANBUL_LCOV_INFO_PATH) | $(COVERALLS)


.PHONY: submit-istanbul-lcov-to-coveralls
20 changes: 20 additions & 0 deletions support/mk/istanbul.mk
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
ISTANBUL ?= istanbul
ISTANBUL_OUT ?= ./reports/coverage
ISTANBUL_REPORT ?= lcov
ISTANBUL_HTML_REPORT_PATH ?= $(ISTANBUL_OUT)/lcov-report/index.html
ISTANBUL_LCOV_INFO_PATH ?= $(ISTANBUL_OUT)/lcov.info


test-istanbul-mocha: node_modules
NODE_PATH=$(NODE_PATH_TEST) \
$(ISTANBUL) cover \
--dir $(ISTANBUL_OUT) --report $(ISTANBUL_REPORT) \
$(_MOCHA) -- \
--reporter $(MOCHA_REPORTER) \
--require $(MOCHA_REQUIRE) $(TESTS)

view-istanbul-report:
open $(ISTANBUL_HTML_REPORT_PATH)


.PHONY: test-istanbul-mocha view-istanbul-report
7 changes: 7 additions & 0 deletions support/mk/jshint.mk
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
JSHINT ?= jshint

lint-jshint:
$(JSHINT) $(SOURCES)


.PHONY: lint-jshint
13 changes: 13 additions & 0 deletions support/mk/mocha.mk
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
MOCHA ?= ./node_modules/.bin/mocha
_MOCHA ?= ./node_modules/.bin/_mocha
MOCHA_REPORTER ?= spec
MOCHA_REQUIRE ?= ./test/bootstrap/node

test-mocha: node_modules
NODE_PATH=$(NODE_PATH_TEST) \
$(MOCHA) \
--reporter $(MOCHA_REPORTER) \
--require $(MOCHA_REQUIRE) $(TESTS)


.PHONY: test-mocha
8 changes: 8 additions & 0 deletions support/mk/node.mk
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
node_modules:
npm install

clobber-node:
rm -rf node_modules


.PHONY: clobber-node
7 changes: 7 additions & 0 deletions support/mk/notes.mk
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
NOTES ?= 'TODO|FIXME'

notes:
grep -Ern $(NOTES) $(SOURCES) $(TESTS)


.PHONY: notes
7 changes: 7 additions & 0 deletions support/mk/testling.mk
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
TESTLING ?= testling

test-testling: node_modules
$(TESTLING)


.PHONY: test-testling

0 comments on commit d1408bf

Please sign in to comment.