reduce nodegit dependency to just those tasks that need it.
This commit is contained in:
parent
09597710c7
commit
0815895e8a
@ -5,7 +5,6 @@ var taskListing = require('gulp-task-listing');
|
|||||||
var path = require('canonical-path');
|
var path = require('canonical-path');
|
||||||
var del = require('del');
|
var del = require('del');
|
||||||
var _ = require('lodash');
|
var _ = require('lodash');
|
||||||
var Git = require("nodegit");
|
|
||||||
var argv = require('yargs').argv;
|
var argv = require('yargs').argv;
|
||||||
var Q = require("q");
|
var Q = require("q");
|
||||||
// delPromise is a 'promise' version of del
|
// 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;
|
// returns a promise containing filePaths with any changed or added examples;
|
||||||
function getChangedExamples(sha) {
|
function getChangedExamples(sha) {
|
||||||
|
var Git = require("nodegit");
|
||||||
var examplesPath = _devguideShredOptions.examplesDir;
|
var examplesPath = _devguideShredOptions.examplesDir;
|
||||||
var relativePath = path.relative(process.cwd(), examplesPath);
|
var relativePath = path.relative(process.cwd(), examplesPath);
|
||||||
return Git.Repository.open(".").then(function(repo) {
|
return Git.Repository.open(".").then(function(repo) {
|
||||||
@ -298,6 +298,7 @@ function getChangedExamples(sha) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
function getChangedExamplesAfter(date, relativePath) {
|
function getChangedExamplesAfter(date, relativePath) {
|
||||||
|
var Git = require("nodegit");
|
||||||
var examplesPath = _devguideShredOptions.examplesDir;
|
var examplesPath = _devguideShredOptions.examplesDir;
|
||||||
var relativePath = path.relative(process.cwd(), examplesPath);
|
var relativePath = path.relative(process.cwd(), examplesPath);
|
||||||
return Git.Repository.open(".").then(function(repo) {
|
return Git.Repository.open(".").then(function(repo) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user