From e9cbc616bbab88c35c09e3c922a90ec646f3fcec Mon Sep 17 00:00:00 2001 From: Gleb Bahmutov Date: Wed, 16 Nov 2016 18:48:06 -0500 Subject: [PATCH] feat(config): allow disabling pre-git hooks via config object, close #96 --- src/pre-git.js | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/pre-git.js b/src/pre-git.js index 18934da..2430c3f 100644 --- a/src/pre-git.js +++ b/src/pre-git.js @@ -148,6 +148,10 @@ function getTasks(label) { la(check.object(pkg), 'missing package', pkg); const config = getConfig(); + if (!config.enabled) { + return; + } + var run = pkg[label] || config && config[label];