Skip to content

Commit

Permalink
Swapped out istanbul CLI in favor of nyc.
Browse files Browse the repository at this point in the history
  • Loading branch information
jeffijoe committed Aug 24, 2016
1 parent 49ca4ce commit 3f019f1
Show file tree
Hide file tree
Showing 4 changed files with 21 additions and 10 deletions.
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
node_modules
npm-debug.log
coverage
coverage
.nyc_output
9 changes: 7 additions & 2 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,10 +1,15 @@
# Oh yeah!
language: node_js

# Add additional versions here as appropriate.
node_js:
- "stable"

# Lint errors should trigger a failure.
before_script: npm run lint

# Runs the coverage script (which runs the tests)
script: npm run cover

# Code coverage
after_success:
npm run coveralls
after_success: npm run coveralls
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,15 +26,15 @@ Well, let me tell you!
* `npm run test-watch`: Runs tests in watch-mode
* `npm run lint`: Lints the code once
* `npm run lint-watch`: Lints the code in watch-mode
* `npm run cover`: Runs code coverage using `istanbul`
* `npm run cover`: Runs code coverage using `nyc` (`istanbul`)
* `npm run coveralls`: Used by coveralls

## Getting started

1. Clone this repo, or download it as a zip
* If you decide to clone, remove the `.git` folder so you don't get unnecessary git history.
2. Find and replace all occurences of `npm-module-boilerplate` and replace
it with your module name - filenames, too!.
it with your module name - filenames, too. You might also want to replace `jeffijoe` with your own Github username... Probably the LICENSE.md as well. :smile:
3. Edit `package.json`, `LICENSE.md` and `README.md` for your own needs.
4. `npm install` and start coding! open 2 terminals, one for linting (`npm run lint-watch`) and one for testing (`npm run test-watch`) - at least that's what I do. ;)
5. Write your code in `lib/npm-module-boilerplate.js` (this is the main file)
Expand Down
15 changes: 10 additions & 5 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,12 +7,12 @@
"node": ">=4.0.0"
},
"scripts": {
"test": "mocha test/**/*.js --require test/index.js",
"test": "mocha test/**/*.spec.js --require test/index.js",
"test-watch": "npm run test -- --watch",
"lint": "esw lib/ test/",
"lint-watch": "npm run lint -- --watch",
"cover": "istanbul cover -x \"**example/**\" ./node_modules/mocha/bin/_mocha -- test/**/*.js --require test/index.js",
"coveralls": "istanbul cover ./node_modules/mocha/bin/_mocha --report lcovonly -- test/**/*.js --require test/index.js && cat ./coverage/lcov.info | ./node_modules/coveralls/bin/coveralls.js",
"cover": "nyc --reporter=lcov --reporter=text npm test",
"coveralls": "nyc report --reporter=text-lcov | coveralls",
"do-publish": "npm run lint && npm run cover && npm publish"
},
"repository": {
Expand All @@ -34,10 +34,15 @@
"eslint-plugin-promise": "^2.0.1",
"eslint-plugin-standard": "^2.0.0",
"eslint-watch": "^2.1.14",
"istanbul": "^0.4.5",
"mocha": "^3.0.2",
"nyc": "^8.1.0",
"sinon": "^1.17.5",
"sinon-chai": "^2.8.0"
},
"dependencies": {}
"dependencies": {},
"nyc": {
"include": [
"lib/**/*.js"
]
}
}

0 comments on commit 3f019f1

Please sign in to comment.