diff --git a/.gitignore b/.gitignore index eb03e3e..14a24ac 100644 --- a/.gitignore +++ b/.gitignore @@ -1,2 +1,3 @@ node_modules *.log +coverage diff --git a/.travis.yml b/.travis.yml index 38b4d1c..f67b4dc 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,2 +1,10 @@ language: node_js -node_js: 4 + +matrix: + include: + - node_js: "4" + env: COVERALLS=1 + - node_js: "6" + +after_success: + - if [ "$COVERALLS" = "1" ]; then npm run coveralls; fi diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md new file mode 100644 index 0000000..81c764f --- /dev/null +++ b/CONTRIBUTING.md @@ -0,0 +1,48 @@ +# Contributing + +New contributions are welcomed. Follow this guide if you want to make one. + +## Make a pull request + +Follow [Github guide](https://help.github.com/articles/creating-a-pull-request) to fork a repo +and create a pull request. + +All bug fixes and new features should go to the [`master`](https://github.com/gemini-testing/glob-extra/tree/master) branch. + +## Commit messages + +Commit messages should describe what have been changed and why. The first line should be wrapped +to 50 characters, the second one should be blank. All other lines should be wrapped to 72 characters. + +## Code style and static analysis + +Before submitting pull request, make sure your code passes all code style and static analysis checks. +To do so, run: + +``` +npm run lint +``` + +## Tests + +Make sure all tests are passing before submitting pull request: + +``` +npm test +``` + +If you are fixing the bug, add a test that fails without your patch and passes with it. If you are +adding a feature, write a test for it. To see test coverage report run: + +``` +npm run cover +``` + +## Issues reporting + +When submitting an issue please do following: + +1. [Search](https://github.com/gemini-testing/glob-extra/issues) for same issues on github in order to prevent duplicates +2. Provide the most detailed issue description so we will additional info to work with + +Note that if no response for contributors questions will be provided in 1 week then issue may be considered as irrelevant/resolved and may be closed. diff --git a/LICENSE b/LICENSE new file mode 100644 index 0000000..c392e82 --- /dev/null +++ b/LICENSE @@ -0,0 +1,20 @@ +The MIT License (MIT) + +Copyright (c) 2014 Sergej Tatarincev + +Permission is hereby granted, free of charge, to any person obtaining a copy of +this software and associated documentation files (the "Software"), to deal in +the Software without restriction, including without limitation the rights to +use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of +the Software, and to permit persons to whom the Software is furnished to do so, +subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS +FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR +COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER +IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN +CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/README.md b/README.md index f59e1a6..2abe716 100644 --- a/README.md +++ b/README.md @@ -1,8 +1,10 @@ -[![Build -Status](https://travis-ci.org/gemini-testing/glob-extra.png)](https://travis-ci.org/gemini-testing/glob-extra) - # glob-extra +[![NPM version](https://img.shields.io/npm/v/glob-extra.svg?style=flat)](https://www.npmjs.org/package/glob-extra) +[![Build Status](https://travis-ci.org/gemini-testing/glob-extra.svg?branch=master)](https://travis-ci.org/gemini-testing/glob-extra) +[![Coverage Status](https://img.shields.io/coveralls/gemini-testing/glob-extra.svg?style=flat)](https://coveralls.io/r/gemini-testing/glob-extra?branch=master) +[![Dependency Status](https://img.shields.io/david/gemini-testing/glob-extra.svg?style=flat)](https://david-dm.org/gemini-testing/glob-extra) + Wrapper for utility [glob](https://github.com/isaacs/node-glob) with promises support which provides expanding of masks, dirs and files to absolute file paths. ## Installation diff --git a/package.json b/package.json index 2f0ec54..4756d63 100644 --- a/package.json +++ b/package.json @@ -2,12 +2,19 @@ "name": "glob-extra", "version": "1.1.1", "description": "Utility which provides expanding of masks, dirs and files to absolute file paths.", + "bugs": "https://github.com/gemini-testing/glob-extra/issues", "main": "lib/index.js", "scripts": { "lint": "eslint .", "test-unit": "mocha test", - "test": "npm run lint && npm run test-unit" + "test": "npm run lint && npm run test-unit", + "cover": "istanbul cover _mocha test", + "coveralls": "npm i coveralls && npm run cover -- --report lcovonly && cat ./coverage/lcov.info | coveralls" }, + "engines": { + "node": ">= 4" + }, + "license": "MIT", "repository": { "type": "git", "url": "git://github.com/gemini-testing/path-utils.git" @@ -28,6 +35,7 @@ "chai-as-promised": "^5.3.0", "eslint": "^3.1.1", "eslint-config-gemini-testing": "^2.2.0", + "istanbul": "^0.4.5", "mocha": "^2.4.5", "proxyquire": "^1.7.3", "sinon": "^1.17.2"