Skip to content

Commit

Permalink
updating jshint config and start using npm run scripts
Browse files Browse the repository at this point in the history
  • Loading branch information
mac- committed May 22, 2015
1 parent 3f11b05 commit 80c5def
Show file tree
Hide file tree
Showing 3 changed files with 75 additions and 78 deletions.
18 changes: 5 additions & 13 deletions Makefile
@@ -1,24 +1,16 @@
clean:
rm -rf node_modules/*
npm run clean

install:
npm install

test:
./node_modules/.bin/jshint lib/* --config test/jshint/config.json
@NODE_ENV=test ./node_modules/.bin/mocha --recursive --reporter spec --timeout 3000 test
npm test

test-lcov:
@NODE_ENV=test ./node_modules/.bin/mocha --require blanket --recursive --timeout 3000 -R mocha-lcov-reporter test

test-cov:
@NODE_ENV=test ./node_modules/.bin/mocha --require blanket --recursive --timeout 3000 -R travis-cov test
npm run test-cov

test-cov-html:
@NODE_ENV=test ./node_modules/.bin/mocha --require blanket --recursive --timeout 3000 -R html-cov test > test/coverage.html
xdg-open "file://${CURDIR}/test/coverage.html" &
npm run test-cov-html

check-deps:
./node_modules/.bin/node-dependencies

.PHONY: test test-cov test-cov-html
.PHONY: test test-cov test-cov-html
131 changes: 68 additions & 63 deletions package.json
@@ -1,65 +1,70 @@
{
"name": "ratify",
"description": "A Hapi plugin for validating the schema of path, query, request body, and response body params using JSON-schema",
"contributors": [
"Mac Angell <mac.ang311@gmail.com>"
],
"version": "0.8.0",
"dependencies": {
"hoek": "2.x.x",
"z-schema": "^3.0.1",
"z-schema-errors": "0.0.1",
"capitalize": "^0.5.0",
"lodash": "^2.4.1",
"boom": "^2.6.1"
},
"devDependencies": {
"mocha": "1.x.x",
"jshint": "2.x.x",
"travis-cov": "0.x.x",
"blanket": "1.x.x",
"rewire": "2.x.x",
"coveralls": "2.x.x",
"mocha-lcov-reporter": "0.x.x",
"node-dependencies": "0.x.x",
"hapi": "8.x.x",
"catbox-memory": "1.x.x"
},
"peerDependencies": {
"hapi": "8.x.x"
},
"keywords": [
"hapi",
"plugin",
"JSON",
"schema",
"validate",
"validation",
"documentation",
"docs"
],
"engines": {
"node": ">=0.10.0"
},
"main": "./lib/ratify.js",
"repository": {
"type": "git",
"url": "https://github.com/mac-/ratify"
},
"scripts": {
"test": "make test && make test-cov && make test-lcov | ./node_modules/coveralls/bin/coveralls.js"
},
"config": {
"blanket": {
"pattern": "//^((?!/node_modules/)(?!/test/).)*$/ig",
"onlyCwd": true,
"data-cover-flags": {
"branchTracking": true
}
},
"travis-cov": {
"threshold": 84
}
},
"license": "MIT"
"name": "ratify",
"description": "A Hapi plugin for validating the schema of path, query, request body, and response body params using JSON-schema",
"contributors": [
"Mac Angell <mac.ang311@gmail.com>"
],
"version": "0.8.1",
"dependencies": {
"hoek": "2.x.x",
"z-schema": "^3.0.1",
"z-schema-errors": "^0.0.1",
"capitalize": "^0.5.0",
"lodash": "^2.4.1",
"boom": "^2.6.1"
},
"devDependencies": {
"mocha": "1.x.x",
"jshint": "2.x.x",
"travis-cov": "0.x.x",
"blanket": "1.x.x",
"rewire": "2.x.x",
"coveralls": "2.x.x",
"mocha-lcov-reporter": "0.x.x",
"hapi": "8.x.x",
"catbox-memory": "1.x.x"
},
"peerDependencies": {
"hapi": "8.x.x"
},
"keywords": [
"hapi",
"plugin",
"JSON",
"schema",
"validate",
"validation",
"documentation",
"docs"
],
"engines": {
"node": ">=0.10.0"
},
"main": "./lib/ratify.js",
"repository": {
"type": "git",
"url": "https://github.com/mac-/ratify"
},
"scripts": {
"lint": "jshint lib/* --config test/jshint/config.json",
"pretest": "npm run lint",
"test": "mocha --recursive --reporter spec --timeout 3000 test",
"test-cov": "mocha --require blanket --recursive --timeout 3000 -R travis-cov test",
"test-lcov": "mocha --require blanket --recursive --timeout 3000 -R mocha-lcov-reporter test | ./node_modules/coveralls/bin/coveralls.js",
"test-cov-html": "mocha --require blanket --recursive --timeout 3000 -R html-cov test > test/coverage.html",
"clean": "rm -fr node_modules"
},
"config": {
"blanket": {
"pattern": "//^((?!/node_modules/)(?!/test/).)*$/ig",
"onlyCwd": true,
"data-cover-flags": {
"branchTracking": true
}
},
"travis-cov": {
"threshold": 84
}
},
"license": "MIT"
}
4 changes: 2 additions & 2 deletions test/jshint/config.json
Expand Up @@ -6,6 +6,7 @@
"es3": false,
"forin": true,
"immed": true,
"indent": 0,
"latedef": true,
"newcap": false,
"noarg": false,
Expand All @@ -17,11 +18,10 @@
"unused": true,
"strict": false,
"trailing": true,
"maxparams": 0,
"maxparams": 5,
"maxdepth": 0,
"maxstatements": 0,
"maxcomplexity": 0,
"maxlen": 0,

"asi": false,
"boss": true,
Expand Down

0 comments on commit 80c5def

Please sign in to comment.