Skip to content

Commit

Permalink
Add coveralls and mocha.
Browse files Browse the repository at this point in the history
  • Loading branch information
pricco committed Jun 25, 2016
1 parent 49433ed commit 2ca71b5
Show file tree
Hide file tree
Showing 5 changed files with 15 additions and 4 deletions.
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,2 +1,5 @@
.DS_Store
node_modules

coverage
npm-debug.log
7 changes: 5 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,11 @@
"name": "gilp",
"version": "0.0.1",
"description": "Gulp tasks for git hooks.",
"main": "index.js",
"main": "src/index.js",
"scripts": {
"lint": "semistandard *.js",
"pretest": "npm run lint",
"test": "mocha --reporter spec"
"test": "istanbul cover ./node_modules/mocha/bin/_mocha --report lcovonly -- -R spec $(find ./test -name *.tests.js) && cat ./coverage/lcov.info | ./node_modules/coveralls/bin/coveralls.js && rm -rf ./coverage"
},
"repository": {
"type": "git",
Expand Down Expand Up @@ -36,6 +36,9 @@
"yargs": "^4.7.1"
},
"devDependencies": {
"coveralls": "^2.11.9",
"istanbul": "^0.4.4",
"mocha": "^2.5.3",
"semistandard": "^8.0.0"
}
}
4 changes: 2 additions & 2 deletions index.js → src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -20,11 +20,11 @@ function Gilp (gulp) {
this._gulp = gulp;
this._installed = [];
this._gulp.task('gilp-install', function (callback) {
fs.readFile(path.join(__dirname, 'hook.js'), 'utf8', function (err, template) {
fs.readFile(path.join(__dirname, '../templates/hook.js'), 'utf8', function (err, template) {
if (err) {
return callback(err);
}
var directory = path.join(gilp.getBaseDirectory(), '.git', 'hooks');
var directory = path.join(gilp.getBaseDirectory(), '.git/hooks');
var installed = gilp._installed.concat();
var saveNext = function () {
var hook = installed.shift();
Expand Down
File renamed without changes.
5 changes: 5 additions & 0 deletions test/gilp.tests.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
var gilp = require('../src');

describe('Gilp module', function () {

});

0 comments on commit 2ca71b5

Please sign in to comment.