diff --git a/.gitignore b/.gitignore index 581b6a7..aac6195 100644 --- a/.gitignore +++ b/.gitignore @@ -46,5 +46,11 @@ Network Trash Folder Temporary Items .apdisk -# Node files -node_modules \ No newline at end of file +# Node dev files +node_modules + +# Node debug.log files +npm-debug.log + +# Coverage files +coverage \ No newline at end of file diff --git a/.travis.yml b/.travis.yml index 9f3aec6..8cc5042 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,4 +1,6 @@ language: node_js node_js: - "iojs" - - "7" \ No newline at end of file + - "7" +after_success: + - npm run report-coverage \ No newline at end of file diff --git a/README.md b/README.md new file mode 100644 index 0000000..65a4984 --- /dev/null +++ b/README.md @@ -0,0 +1,10 @@ +# node-examples + +[![Build Status](https://travis-ci.org/pbbadenhorst/node-examples.svg?branch=vanilla-jasmine)](https://travis-ci.org/pbbadenhorst/node-examples) +[![Coverage Status](https://coveralls.io/repos/github/pbbadenhorst/node-examples/badge.svg?branch=vanilla-jasmine)](https://coveralls.io/github/pbbadenhorst/node-examples?branch=vanilla-jasmine) +[![CircleCI](https://circleci.com/gh/pbbadenhorst/node-examples/tree/vanilla-jasmine.svg?style=shield)](https://circleci.com/gh/pbbadenhorst/node-examples/tree/vanilla-jasmine) + + +[![Code Climate](https://codeclimate.com/github/pbbadenhorst/node-examples/badges/gpa.svg)](https://codeclimate.com/github/pbbadenhorst/node-examples) +[![Test Coverage](https://codeclimate.com/github/pbbadenhorst/node-examples/badges/coverage.svg)](https://codeclimate.com/github/pbbadenhorst/node-examples/coverage) +[![Issue Count](https://codeclimate.com/github/pbbadenhorst/node-examples/badges/issue_count.svg)](https://codeclimate.com/github/pbbadenhorst/node-examples) \ No newline at end of file diff --git a/package.json b/package.json index eb99cec..401d2b7 100644 --- a/package.json +++ b/package.json @@ -5,13 +5,22 @@ "main": "app\\server.js", "dependencies": {}, "devDependencies": { + "codeclimate-test-reporter": "^0.4.1", + "coveralls": "^2.13.1", + "cross-env": "^5.0.0", + "istanbul": "^0.4.5", "jasmine": "^2.6.0" }, "scripts": { "vanilla-jasmine": "node vanilla-jasmine/src/index.js", - "vanilla-jasmine-test": "node vanilla-jasmine/spec/index.js", + "vanilla-jasmine-test": "istanbul cover vanilla-jasmine/spec/index.js", + "vanilla-jasmine-coverage": "istanbul cover vanilla-jasmine/spec/index.js", + "report-coverage": "npm run script report-coverage:coveralls & npm run script report-coverage:codeclimate", + "report-coverage:coveralls": "cat ./coverage/lcov.info | coveralls", + "report-coverage:codeclimate": "cross-env CODECLIMATE_REPO_TOKEN=4cc379a927597359590431e4c81655d109e3be94e15269ad0cbf9701ec50c98f codeclimate-test-reporter < coverage/lcov.info", "start": "npm run vanilla-jasmine", - "test": "npm run vanilla-jasmine-test" + "test": "npm run vanilla-jasmine-test", + "coverage": "npm run vanilla-jasmine-coverage" }, "repository": { "type": "git", @@ -25,4 +34,4 @@ ], "author": "Bernard Badenhorst", "license": "ISC" -} +} \ No newline at end of file