From 0815895e8a63175bb85f36bc6b7f767d814c49b9 Mon Sep 17 00:00:00 2001 From: Jay Traband Date: Fri, 16 Oct 2015 14:35:58 -0700 Subject: [PATCH] reduce nodegit dependency to just those tasks that need it. --- gulpfile.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/gulpfile.js b/gulpfile.js index 6fbfc84523..e3d889b12e 100644 --- a/gulpfile.js +++ b/gulpfile.js @@ -5,7 +5,6 @@ var taskListing = require('gulp-task-listing'); var path = require('canonical-path'); var del = require('del'); var _ = require('lodash'); -var Git = require("nodegit"); var argv = require('yargs').argv; var Q = require("q"); // delPromise is a 'promise' version of del @@ -282,6 +281,7 @@ function buildShredMaps(shouldWrite) { // returns a promise containing filePaths with any changed or added examples; function getChangedExamples(sha) { + var Git = require("nodegit"); var examplesPath = _devguideShredOptions.examplesDir; var relativePath = path.relative(process.cwd(), examplesPath); return Git.Repository.open(".").then(function(repo) { @@ -298,6 +298,7 @@ function getChangedExamples(sha) { } function getChangedExamplesAfter(date, relativePath) { + var Git = require("nodegit"); var examplesPath = _devguideShredOptions.examplesDir; var relativePath = path.relative(process.cwd(), examplesPath); return Git.Repository.open(".").then(function(repo) {