Skip to content

Commit 75e07ec

Browse files
committed
[INIT]
0 parents  commit 75e07ec

File tree

13 files changed

+573
-0
lines changed

13 files changed

+573
-0
lines changed

.editorconfig

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
root = true
2+
3+
[*]
4+
indent_style = tab
5+
end_of_line = lf
6+
charset = utf-8
7+
trim_trailing_whitespace = true
8+
insert_final_newline = true
9+
10+
[*.md]
11+
trim_trailing_whitespace = false

.gitignore

Lines changed: 62 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,62 @@
1+
2+
# Directories #
3+
###############
4+
reports/
5+
build/
6+
7+
# Compiled source #
8+
###################
9+
*.com
10+
*.class
11+
*.dll
12+
*.exe
13+
*.o
14+
*.so
15+
16+
# Packages #
17+
############
18+
# it's better to unpack these files and commit the raw source
19+
# git has its own built in compression methods
20+
*.7z
21+
*.dmg
22+
*.gz
23+
*.iso
24+
*.jar
25+
*.rar
26+
*.tar
27+
*.zip
28+
29+
# Logs and databases #
30+
######################
31+
*.log
32+
*.sql
33+
*.sqlite
34+
35+
# OS generated files #
36+
######################
37+
.DS_Store
38+
.DS_Store?
39+
._*
40+
.Spotlight-V100
41+
.Trashes
42+
Icon?
43+
ehthumbs.db
44+
Thumbs.db
45+
Desktop.ini
46+
47+
# Temporary files #
48+
###################
49+
*~
50+
51+
# Node.js #
52+
###########
53+
/node_modules/
54+
55+
# Matlab #
56+
##########
57+
58+
# Windows default autosave extension
59+
*.asv
60+
61+
# Compiled MEX binaries (all platforms)
62+
*.mex*

.jshintrc

Lines changed: 71 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,71 @@
1+
{
2+
"bitwise": false,
3+
"camelcase": false,
4+
"curly": true,
5+
"eqeqeq": true,
6+
"es3": false,
7+
"forin": true,
8+
"freeze": true,
9+
"immed": true,
10+
"indent": 4,
11+
"latedef": "nofunc",
12+
"newcap": true,
13+
"noarg": true,
14+
"noempty": false,
15+
"nonbsp": true,
16+
"nonew": true,
17+
"plusplus": false,
18+
"quotmark": "single",
19+
"undef": true,
20+
"unused": true,
21+
"strict": true,
22+
"maxparams": 10,
23+
"maxdepth": 5,
24+
"maxstatements": 100,
25+
"maxcomplexity": false,
26+
"maxlen": 1000,
27+
"asi": false,
28+
"boss": false,
29+
"debug": false,
30+
"eqnull": false,
31+
"esnext": false,
32+
"evil": false,
33+
"expr": false,
34+
"funcscope": false,
35+
"globalstrict": false,
36+
"iterator": false,
37+
"lastsemic": false,
38+
"laxbreak": false,
39+
"laxcomma": false,
40+
"loopfunc": false,
41+
"maxerr": 1000,
42+
"moz": false,
43+
"multistr": false,
44+
"notypeof": false,
45+
"proto": false,
46+
"scripturl": false,
47+
"shadow": false,
48+
"sub": true,
49+
"supernew": false,
50+
"validthis": false,
51+
"noyield": false,
52+
"browser": true,
53+
"browserify": true,
54+
"couch": false,
55+
"devel": true,
56+
"dojo": false,
57+
"jasmine": false,
58+
"jquery": false,
59+
"mocha": true,
60+
"mootools": false,
61+
"node": true,
62+
"nonstandard": false,
63+
"prototypejs": false,
64+
"qunit": false,
65+
"rhino": false,
66+
"shelljs": false,
67+
"worker": false,
68+
"wsh": false,
69+
"yui": false,
70+
"globals": {}
71+
}

.npmignore

Lines changed: 51 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,51 @@
1+
2+
# Files #
3+
#########
4+
Makefile
5+
README.md
6+
TODO.md
7+
8+
# Directories #
9+
###############
10+
build/
11+
docs/
12+
examples/
13+
reports/
14+
support/
15+
test/
16+
benchmark/
17+
18+
# Node.js #
19+
###########
20+
.npmignore
21+
/node_modules/
22+
23+
# Logs #
24+
########
25+
*.log
26+
27+
# OS generated files #
28+
######################
29+
.DS_Store
30+
.DS_Store?
31+
._*
32+
.Spotlight-V100
33+
.Trashes
34+
Icon?
35+
ehthumbs.db
36+
Thumbs.db
37+
Desktop.ini
38+
39+
# Temporary files #
40+
###################
41+
*~
42+
43+
# Git #
44+
#######
45+
.git*
46+
47+
# Utilities #
48+
#############
49+
.jshintrc
50+
.travis.yml
51+
.editorconfig

.travis.yml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
language: node_js
2+
node_js:
3+
- "0.10"
4+
after_script:
5+
- npm run coveralls

LICENSE

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
The MIT License (MIT)
2+
3+
Copyright (c) 2014 Athan Reines.
4+
5+
Permission is hereby granted, free of charge, to any person obtaining a copy
6+
of this software and associated documentation files (the "Software"), to deal
7+
in the Software without restriction, including without limitation the rights
8+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9+
copies of the Software, and to permit persons to whom the Software is
10+
furnished to do so, subject to the following conditions:
11+
12+
The above copyright notice and this permission notice shall be included in all
13+
copies or substantial portions of the Software.
14+
15+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21+
SOFTWARE.

Makefile

Lines changed: 124 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,124 @@
1+
2+
#############
3+
# VARIABLES #
4+
5+
# Set the node.js environment to test:
6+
NODE_ENV ?= test
7+
8+
9+
# NOTES #
10+
11+
NOTES ?= 'TODO|FIXME'
12+
13+
14+
# MOCHA #
15+
16+
# Specify the test framework bin locations:
17+
MOCHA ?= ./node_modules/.bin/mocha
18+
_MOCHA ?= ./node_modules/.bin/_mocha
19+
20+
# Specify the mocha reporter:
21+
MOCHA_REPORTER ?= spec
22+
23+
24+
# ISTANBUL #
25+
26+
# Istanbul configuration:
27+
ISTANBUL ?= ./node_modules/.bin/istanbul
28+
ISTANBUL_OUT ?= ./reports/coverage
29+
ISTANBUL_REPORT ?= lcov
30+
ISTANBUL_LCOV_INFO_PATH ?= $(ISTANBUL_OUT)/lcov.info
31+
ISTANBUL_HTML_REPORT_PATH ?= $(ISTANBUL_OUT)/lcov-report/index.html
32+
33+
34+
35+
# FILES #
36+
37+
# Source files:
38+
SOURCES ?= lib/*.js
39+
40+
# Test files:
41+
TESTS ?= test/*.js
42+
43+
44+
45+
46+
###########
47+
# TARGETS #
48+
49+
50+
# NOTES #
51+
52+
.PHONY: notes
53+
54+
notes:
55+
grep -Ern $(NOTES) $(SOURCES) $(TESTS)
56+
57+
58+
59+
# UNIT TESTS #
60+
61+
.PHONY: test test-mocha
62+
63+
test: test-mocha
64+
65+
test-mocha: node_modules
66+
NODE_ENV=$(NODE_ENV) \
67+
NODE_PATH=$(NODE_PATH_TEST) \
68+
$(MOCHA) \
69+
--reporter $(MOCHA_REPORTER) \
70+
$(TESTS)
71+
72+
73+
74+
# CODE COVERAGE #
75+
76+
.PHONY: test-cov test-istanbul-mocha
77+
78+
test-cov: test-istanbul-mocha
79+
80+
test-istanbul-mocha: node_modules
81+
NODE_ENV=$(NODE_ENV) \
82+
NODE_PATH=$(NODE_PATH_TEST) \
83+
$(ISTANBUL) cover \
84+
--dir $(ISTANBUL_OUT) \
85+
--report $(ISTANBUL_REPORT) \
86+
$(_MOCHA) -- \
87+
--reporter $(MOCHA_REPORTER) \
88+
$(TESTS)
89+
90+
91+
92+
# COVERAGE REPORT #
93+
94+
.PHONY: view-cov view-istanbul-report
95+
96+
view-cov: view-istanbul-report
97+
98+
view-istanbul-report:
99+
open $(ISTANBUL_HTML_REPORT_PATH)
100+
101+
102+
103+
# NODE #
104+
105+
# Installing node_modules:
106+
.PHONY: install
107+
108+
install:
109+
npm install
110+
111+
# Clean node:
112+
.PHONY: clean-node
113+
114+
clean-node:
115+
rm -rf node_modules
116+
117+
118+
119+
# CLEAN #
120+
121+
.PHONY: clean
122+
123+
clean:
124+
rm -rf build

0 commit comments

Comments
 (0)