Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Install feature #44

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 18 additions & 0 deletions install.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
'use strict';

require('shelljs/global');
var path = require('path');
var gup = require('guppy-cli');
var async = require('async');

function rootApplicationPath() {
return exec('git rev-parse --show-toplevel', { silent: true }).output;
}

var pkg = require(path.join(rootApplicationPath(), 'package.json'));

if (pkg['guppy-hooks']) {
async.each(pkg['guppy-hooks'], function (hook, next) {
gup.install(hook, null, next);
});
}
7 changes: 6 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,12 @@
},
"scripts": {
"test": "gulp unit",
"postinstall": "node install.js",
"semantic-release": "semantic-release pre && npm publish && semantic-release post"
},
"guppy-hooks": [
"pre-commit"
],
"devDependencies": {
"chai": "~1.9.1",
"gulp": "^3.8.10",
Expand All @@ -35,7 +39,7 @@
"gulp-jshint": "^1.8.3",
"gulp-load-plugins": "^0.10.0",
"gulp-mocha": "^2.0.0",
"guppy-pre-commit": "^0.2.0",
"guppy-cli": "^0.3.1",
"jshint-stylish": "^0.4.0",
"mocha": "*",
"proxyquire": "^1.1.0",
Expand All @@ -44,6 +48,7 @@
"semantic-release": "^4.3.5"
},
"dependencies": {
"async": "^1.4.2",
"lodash": "^3.8.0",
"map-stream": "0.0.5",
"shelljs": "^0.4.0",
Expand Down