fix config traveling

This commit is contained in:
Philipp Kunz 2016-02-23 18:35:28 +01:00
parent c18eb85ec8
commit 414e845b80
2 changed files with 18 additions and 14 deletions

16
dist/npmts.jsdoc.js vendored
View File

@ -3,7 +3,7 @@
/// <reference path="./typings/main.d.ts" /> /// <reference path="./typings/main.d.ts" />
var plugins = require("./npmts.plugins"); var plugins = require("./npmts.plugins");
var paths = require("./npmts.paths"); var paths = require("./npmts.paths");
var genJsdoc = function () { var genJsdoc = function (configArg) {
var done = plugins.Q.defer(); var done = plugins.Q.defer();
plugins.beautylog.log("now generating " + "JsDoc documentation".blue); plugins.beautylog.log("now generating " + "JsDoc documentation".blue);
plugins.gulp.src([ plugins.gulp.src([
@ -14,10 +14,12 @@ var genJsdoc = function () {
opts: { opts: {
destination: paths.docsDir destination: paths.docsDir
} }
}, done.resolve)); }, function () {
done.resolve(configArg);
}));
return done.promise; return done.promise;
}; };
var publishDocs = function () { var publishDocs = function (configArg) {
var done = plugins.Q.defer(); var done = plugins.Q.defer();
var gitUrl = plugins.projectinfo.npm(paths.cwd, { var gitUrl = plugins.projectinfo.npm(paths.cwd, {
gitAccessToken: process.env.GITHUB_TOKEN gitAccessToken: process.env.GITHUB_TOKEN
@ -44,16 +46,16 @@ var publishDocs = function () {
plugins.beautylog.error('Error: Git failed'); plugins.beautylog.error('Error: Git failed');
plugins.shelljs.exit(1); plugins.shelljs.exit(1);
} }
done.resolve(); done.resolve(configArg);
} }
else { else {
done.resolve(); done.resolve(configArg);
} }
return done.promise; return done.promise;
}; };
exports.run = function () { exports.run = function (configArg) {
var done = plugins.Q.defer(); var done = plugins.Q.defer();
genJsdoc() genJsdoc(configArg)
.then(publishDocs) .then(publishDocs)
.then(done.resolve); .then(done.resolve);
return done.promise; return done.promise;

View File

@ -2,7 +2,7 @@
import plugins = require("./npmts.plugins"); import plugins = require("./npmts.plugins");
import paths = require("./npmts.paths"); import paths = require("./npmts.paths");
var genJsdoc = function(){ var genJsdoc = function(configArg){
var done = plugins.Q.defer(); var done = plugins.Q.defer();
plugins.beautylog.log("now generating " + "JsDoc documentation".blue); plugins.beautylog.log("now generating " + "JsDoc documentation".blue);
plugins.gulp.src([ plugins.gulp.src([
@ -13,11 +13,13 @@ var genJsdoc = function(){
opts: { opts: {
destination: paths.docsDir destination: paths.docsDir
} }
}, done.resolve)); }, function(){
done.resolve(configArg)
}));
return done.promise; return done.promise;
}; };
var publishDocs = function(){ var publishDocs = function(configArg){
var done = plugins.Q.defer(); var done = plugins.Q.defer();
var gitUrl = plugins.projectinfo.npm( var gitUrl = plugins.projectinfo.npm(
paths.cwd, paths.cwd,
@ -48,17 +50,17 @@ var publishDocs = function(){
plugins.beautylog.error('Error: Git failed'); plugins.beautylog.error('Error: Git failed');
plugins.shelljs.exit(1); plugins.shelljs.exit(1);
} }
done.resolve(); done.resolve(configArg);
} else { } else {
done.resolve(); done.resolve(configArg);
} }
return done.promise; return done.promise;
}; };
export var run = function(){ export var run = function(configArg){
var done = plugins.Q.defer(); var done = plugins.Q.defer();
genJsdoc() genJsdoc(configArg)
.then(publishDocs) .then(publishDocs)
.then(done.resolve); .then(done.resolve);
return done.promise; return done.promise;