fix small promise error

This commit is contained in:
Philipp Kunz 2016-03-26 17:35:55 +01:00
parent e8238dc907
commit 60d200135e
6 changed files with 19 additions and 27 deletions

6
dist/npmts.jsdoc.js vendored
View File

@ -34,7 +34,6 @@ exports.publishDocs = function (configArg) {
+ "&& git push --force --quiet "
+ "\"" + gitUrl + "\" "
+ "master:gh-pages " + "> /dev/null 2>&1";
if (configArg.docs.publish) {
plugins.beautylog.log("now publishing JsDoc documentation to GitHub");
if (!plugins.shelljs.which('git')) {
plugins.beautylog.error('Git is not installed!');
@ -46,11 +45,6 @@ exports.publishDocs = function (configArg) {
}
plugins.beautylog.ok("JsDoc documentation has been deployed to GitHub!");
done.resolve(configArg);
}
else {
console.log("GitHub documentation has not been uploaded.");
done.resolve(configArg);
}
return done.promise;
};
exports.run = function (configArg) {

View File

@ -40,6 +40,9 @@ exports.run = function () {
console.log(shipString);
plugins.beautylog.success("READY TO SHIP!");
}
else {
plugins.beautylog.success("Done!");
}
});
return promisechain;
};

View File

@ -10,6 +10,6 @@ exports.run = function (configArg) {
config.coveralls ? promiseArray.push(NpmtsTests.publishCoverage(configArg)) : void (0);
config.docs.publish ? promiseArray.push(NpmtsJsdoc.publishDocs(configArg)) : void (0);
promiseArray.length === 0 ? plugins.beautylog.info("Did not publish anything!") : void (0);
plugins.Q.all(promiseArray).then(done.resolve());
plugins.Q.all(promiseArray).then(done.resolve);
return done.promise;
};

11
dist/npmts.tests.js vendored
View File

@ -7,17 +7,10 @@ exports.publishCoverage = function (configArg) {
plugins.beautylog.log("now uploading coverage data to coveralls");
var stream = plugins.gulp.src([plugins.path.join(paths.cwd, "./coverage/lcov.info")])
.pipe(plugins.g.coveralls())
.pipe(plugins.g.gFunction([
function () {
var done = plugins.Q.defer();
.pipe(plugins.g.gFunction(function () {
plugins.beautylog.ok("Coverage data has been uploaded to Coveralls!");
done.resolve();
return done.promise;
}
], "atEnd"));
stream.on("finish", function () {
done.resolve(configArg);
});
}, "atEnd"));
return done.promise;
};
exports.run = function (configArg) {

View File

@ -40,6 +40,8 @@ export var run = function(){
if (process.env.CI){
console.log(shipString);
plugins.beautylog.success("READY TO SHIP!");
} else {
plugins.beautylog.success("Done!")
}
});

View File

@ -14,6 +14,6 @@ export let run = function(configArg){
config.docs.publish ? promiseArray.push(NpmtsJsdoc.publishDocs(configArg)) : void(0);
promiseArray.length === 0 ? plugins.beautylog.info("Did not publish anything!") : void(0);
plugins.Q.all(promiseArray).then(done.resolve());
plugins.Q.all(promiseArray).then(done.resolve);
return done.promise;
};