fix config traveling
This commit is contained in:
parent
c18eb85ec8
commit
414e845b80
16
dist/npmts.jsdoc.js
vendored
16
dist/npmts.jsdoc.js
vendored
@ -3,7 +3,7 @@
|
||||
/// <reference path="./typings/main.d.ts" />
|
||||
var plugins = require("./npmts.plugins");
|
||||
var paths = require("./npmts.paths");
|
||||
var genJsdoc = function () {
|
||||
var genJsdoc = function (configArg) {
|
||||
var done = plugins.Q.defer();
|
||||
plugins.beautylog.log("now generating " + "JsDoc documentation".blue);
|
||||
plugins.gulp.src([
|
||||
@ -14,10 +14,12 @@ var genJsdoc = function () {
|
||||
opts: {
|
||||
destination: paths.docsDir
|
||||
}
|
||||
}, done.resolve));
|
||||
}, function () {
|
||||
done.resolve(configArg);
|
||||
}));
|
||||
return done.promise;
|
||||
};
|
||||
var publishDocs = function () {
|
||||
var publishDocs = function (configArg) {
|
||||
var done = plugins.Q.defer();
|
||||
var gitUrl = plugins.projectinfo.npm(paths.cwd, {
|
||||
gitAccessToken: process.env.GITHUB_TOKEN
|
||||
@ -44,16 +46,16 @@ var publishDocs = function () {
|
||||
plugins.beautylog.error('Error: Git failed');
|
||||
plugins.shelljs.exit(1);
|
||||
}
|
||||
done.resolve();
|
||||
done.resolve(configArg);
|
||||
}
|
||||
else {
|
||||
done.resolve();
|
||||
done.resolve(configArg);
|
||||
}
|
||||
return done.promise;
|
||||
};
|
||||
exports.run = function () {
|
||||
exports.run = function (configArg) {
|
||||
var done = plugins.Q.defer();
|
||||
genJsdoc()
|
||||
genJsdoc(configArg)
|
||||
.then(publishDocs)
|
||||
.then(done.resolve);
|
||||
return done.promise;
|
||||
|
@ -2,7 +2,7 @@
|
||||
import plugins = require("./npmts.plugins");
|
||||
import paths = require("./npmts.paths");
|
||||
|
||||
var genJsdoc = function(){
|
||||
var genJsdoc = function(configArg){
|
||||
var done = plugins.Q.defer();
|
||||
plugins.beautylog.log("now generating " + "JsDoc documentation".blue);
|
||||
plugins.gulp.src([
|
||||
@ -13,11 +13,13 @@ var genJsdoc = function(){
|
||||
opts: {
|
||||
destination: paths.docsDir
|
||||
}
|
||||
}, done.resolve));
|
||||
}, function(){
|
||||
done.resolve(configArg)
|
||||
}));
|
||||
return done.promise;
|
||||
};
|
||||
|
||||
var publishDocs = function(){
|
||||
var publishDocs = function(configArg){
|
||||
var done = plugins.Q.defer();
|
||||
var gitUrl = plugins.projectinfo.npm(
|
||||
paths.cwd,
|
||||
@ -48,17 +50,17 @@ var publishDocs = function(){
|
||||
plugins.beautylog.error('Error: Git failed');
|
||||
plugins.shelljs.exit(1);
|
||||
}
|
||||
done.resolve();
|
||||
done.resolve(configArg);
|
||||
} else {
|
||||
done.resolve();
|
||||
done.resolve(configArg);
|
||||
}
|
||||
return done.promise;
|
||||
};
|
||||
|
||||
|
||||
export var run = function(){
|
||||
export var run = function(configArg){
|
||||
var done = plugins.Q.defer();
|
||||
genJsdoc()
|
||||
genJsdoc(configArg)
|
||||
.then(publishDocs)
|
||||
.then(done.resolve);
|
||||
return done.promise;
|
||||
|
Loading…
Reference in New Issue
Block a user