Skip to content

Commit 9110904

Browse files
committed
=BG= set up linting, testing, and coverage tasks, plus travis and coveralls integration
1 parent 0f0c437 commit 9110904

File tree

7 files changed

+153
-29
lines changed

7 files changed

+153
-29
lines changed

.gitignore

Lines changed: 3 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,7 @@
1-
lib-cov
2-
*.seed
3-
*.log
4-
*.csv
5-
*.dat
6-
*.out
7-
*.pid
8-
*.gz
9-
10-
pids
11-
logs
12-
results
13-
14-
npm-debug.log
15-
16-
# individual excludes, to avoid accidental commits
1+
/npm-debug.log
172
/static/favicon.ico
183
/node_modules
194
/doco/private
205
/doco
6+
/coverage
7+
/.coveralls.yml

.jshintignore

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
/rewrite
2+
/examples
3+
/doco
4+
5+
/node_modules
6+
/coverage
7+
/test

.jshintrc

Lines changed: 87 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,87 @@
1+
{
2+
// JSHint Default Configuration File (as on JSHint website)
3+
// See http://jshint.com/docs/ for more details
4+
5+
"maxerr" : 50, // {int} Maximum error before stopping
6+
7+
// Enforcing
8+
"bitwise" : true, // true: Prohibit bitwise operators (&, |, ^, etc.)
9+
"camelcase" : false, // true: Identifiers must be in camelCase
10+
"curly" : true, // true: Require {} for every new block or scope
11+
"eqeqeq" : true, // true: Require triple equals (===) for comparison
12+
"forin" : true, // true: Require filtering for..in loops with obj.hasOwnProperty()
13+
"freeze" : true, // true: prohibits overwriting prototypes of native objects such as Array, Date etc.
14+
"immed" : false, // true: Require immediate invocations to be wrapped in parens e.g. `(function () { } ());`
15+
"indent" : 4, // {int} Number of spaces to use for indentation
16+
"latedef" : false, // true: Require variables/functions to be defined before being used
17+
"newcap" : false, // true: Require capitalization of all constructor functions e.g. `new F()`
18+
"noarg" : true, // true: Prohibit use of `arguments.caller` and `arguments.callee`
19+
"noempty" : true, // true: Prohibit use of empty blocks
20+
"nonbsp" : true, // true: Prohibit "non-breaking whitespace" characters.
21+
"nonew" : false, // true: Prohibit use of constructors for side-effects (without assignment)
22+
"plusplus" : false, // true: Prohibit use of `++` & `--`
23+
"quotmark" : false, // Quotation mark consistency:
24+
// false : do nothing (default)
25+
// true : ensure whatever is used is consistent
26+
// "single" : require single quotes
27+
// "double" : require double quotes
28+
"undef" : true, // true: Require all non-global variables to be declared (prevents global leaks)
29+
"unused" : true, // true: Require all defined variables be used
30+
"strict" : true, // true: Requires all functions run in ES5 Strict Mode
31+
"maxparams" : false, // {int} Max number of formal params allowed per function
32+
"maxdepth" : false, // {int} Max depth of nested blocks (within functions)
33+
"maxstatements" : false, // {int} Max number statements per function
34+
"maxcomplexity" : false, // {int} Max cyclomatic complexity per function
35+
"maxlen" : false, // {int} Max number of characters per line
36+
37+
// Relaxing
38+
"asi" : false, // true: Tolerate Automatic Semicolon Insertion (no semicolons)
39+
"boss" : false, // true: Tolerate assignments where comparisons would be expected
40+
"debug" : false, // true: Allow debugger statements e.g. browser breakpoints.
41+
"eqnull" : false, // true: Tolerate use of `== null`
42+
"es5" : false, // true: Allow ES5 syntax (ex: getters and setters)
43+
"esnext" : false, // true: Allow ES.next (ES6) syntax (ex: `const`)
44+
"moz" : false, // true: Allow Mozilla specific syntax (extends and overrides esnext features)
45+
// (ex: `for each`, multiple try/catch, function expression…)
46+
"evil" : false, // true: Tolerate use of `eval` and `new Function()`
47+
"expr" : false, // true: Tolerate `ExpressionStatement` as Programs
48+
"funcscope" : false, // true: Tolerate defining variables inside control statements
49+
"globalstrict" : false, // true: Allow global "use strict" (also enables 'strict')
50+
"iterator" : false, // true: Tolerate using the `__iterator__` property
51+
"lastsemic" : false, // true: Tolerate omitting a semicolon for the last statement of a 1-line block
52+
"laxbreak" : false, // true: Tolerate possibly unsafe line breakings
53+
"laxcomma" : false, // true: Tolerate comma-first style coding
54+
"loopfunc" : false, // true: Tolerate functions being defined in loops
55+
"multistr" : false, // true: Tolerate multi-line strings
56+
"noyield" : false, // true: Tolerate generator functions with no yield statement in them.
57+
"notypeof" : false, // true: Tolerate invalid typeof operator values
58+
"proto" : false, // true: Tolerate using the `__proto__` property
59+
"scripturl" : false, // true: Tolerate script-targeted URLs
60+
"shadow" : false, // true: Allows re-define variables later in code e.g. `var x=1; x=2;`
61+
"sub" : false, // true: Tolerate using `[]` notation when it can still be expressed in dot notation
62+
"supernew" : false, // true: Tolerate `new function () { ... };` and `new Object;`
63+
"validthis" : false, // true: Tolerate using this in a non-constructor function
64+
65+
// Environments
66+
"browser" : true, // Web Browser (window, document, etc)
67+
"browserify" : false, // Browserify (node.js code in the browser)
68+
"couch" : false, // CouchDB
69+
"devel" : true, // Development/debugging (alert, confirm, etc)
70+
"dojo" : false, // Dojo Toolkit
71+
"jasmine" : false, // Jasmine
72+
"jquery" : false, // jQuery
73+
"mocha" : true, // Mocha
74+
"mootools" : false, // MooTools
75+
"node" : true, // Node.js
76+
"nonstandard" : false, // Widely adopted globals (escape, unescape, etc)
77+
"prototypejs" : false, // Prototype and Scriptaculous
78+
"qunit" : false, // QUnit
79+
"rhino" : false, // Rhino
80+
"shelljs" : false, // ShellJS
81+
"worker" : false, // Web Workers
82+
"wsh" : false, // Windows Scripting Host
83+
"yui" : false, // Yahoo User Interface
84+
85+
// Custom Globals
86+
"globals" : {} // additional predefined global variables
87+
}

.npmignore

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
/rewrite
2+
3+
/npm-debug.log
4+
/static/favicon.ico
5+
/node_modules
6+
/doco/private
7+
/doco
8+
/coverage
9+
/.coveralls.yml
10+
11+
/test

.travis.yml

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
language: node_js
2+
node_js:
3+
- "0.10"
4+
- "0.11"
5+
- "0.12"
6+
- "iojs"
7+
- "iojs-v1.0.4"
8+
script:
9+
- npm run lint
10+
- npm run coveralls

README.md

Lines changed: 15 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,9 @@
1-
#qryq
1+
# `qryq`
2+
3+
[![NPM](https://nodei.co/npm/qryq.png)](https://github.com/bguiz/qryq/)
4+
5+
[![Build Status](https://travis-ci.org/bguiz/qryq.svg?branch=master)](https://travis-ci.org/bguiz/qryq)
6+
[![Coverage Status](https://coveralls.io/repos/bguiz/qryq/badge.svg?branch=master)](https://coveralls.io/r/bguiz/qryq?branch=master)
27

38
qryq is a NodeJs library that allows one to express a series of queries and define dependencies between them either in parallel, in sequence, or in a directed acyclic graph.
49

@@ -42,9 +47,17 @@ In summary:
4247

4348
`qryq` is pronounced as `/ˈkwərik/`.
4449

50+
## Contributing
51+
52+
This repository uses the
53+
[**git flow** ](http://nvie.com/posts/a-successful-git-branching-model/)
54+
branching strategy.
55+
If you wish to contribute, please branch from the **develop** branch -
56+
pull requests will only be requested if they request merging into the develop branch.
57+
4558
## Licence
4659

47-
[GPL v3](https://github.com/bguiz/qryq/blob/master/LICENCE.md)
60+
GPLv3
4861

4962
## Author
5063

package.json

Lines changed: 20 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -2,38 +2,47 @@
22
"name": "qryq",
33
"preferGlobal": false,
44
"description": "qryq allows one to express a series of queries and define dependencies between them either in parallel, in sequence, or in a directed acyclic graph",
5-
"author": "Brendan Graetz <[email protected]> (http://bguiz.com)",
6-
5+
"author": ["bguiz"],
76
"config": {
8-
"defaults": {
9-
},
10-
"limits": {
11-
}
7+
"defaults": {},
8+
"limits": {}
129
},
1310
"homepage": "https://github.com/bguiz/qryq",
1411
"bugs": {
15-
"url": "https://github.com/bguiz/qryq/issues"
12+
"url": "https://github.com/bguiz/qryq/issues"
1613
},
1714
"version": "0.0.10",
1815
"engines": {
1916
"node": ">= 0.8.10"
2017
},
2118
"dependencies": {
2219
"q": "~0.9.6",
23-
"underscore":"~1.4.4"
20+
"underscore": "~1.4.4"
2421
},
2522
"devDependencies": {
26-
"nodeunit":"~0.8.1"
23+
"coveralls": "^2.11.2",
24+
"istanbul": "^0.3.13",
25+
"jasmine-node": "^1.14.5",
26+
"jshint": "^2.6.3",
27+
"jshint-stylish": "^1.0.1"
2728
},
2829
"scripts": {
29-
"test": "nodeunit ./test.js"
30+
"test": "node ./node_modules/jasmine-node/bin/jasmine-node test",
31+
"lint": "./node_modules/jshint/bin/jshint --verbose --reporter ./node_modules/jshint-stylish .",
32+
"cover": "node ./node_modules/istanbul/lib/cli cover ./node_modules/jasmine-node/bin/jasmine-node test",
33+
"coveralls": "npm run cover && cat ./coverage/lcov.info | ./node_modules/coveralls/bin/coveralls.js"
3034
},
3135
"main": "qryq.js",
3236
"repository": {
3337
"type": "git",
3438
"url": "https://github.com/bguiz/qryq.git"
3539
},
36-
"keywords": ["promise", "async", "dependencies", "query management"],
40+
"keywords": [
41+
"promise",
42+
"async",
43+
"dependencies",
44+
"query management"
45+
],
3746
"license": {
3847
"type": "GPL v3",
3948
"url": "http://opensource.org/licenses/GPL-3.0"

0 commit comments

Comments
 (0)