add optional docs publishing

This commit is contained in:
Philipp Kunz 2016-02-25 08:39:38 +01:00
parent 070385867e
commit f7304f59a5
4 changed files with 8 additions and 4 deletions

View File

@ -2,5 +2,6 @@
support
compile
test/
docs/
examples
.gitignore

2
dist/npmts.jsdoc.js vendored
View File

@ -32,7 +32,7 @@ var publishDocs = function (configArg) {
+ "&& git push --force --quiet "
+ "\"" + gitUrl + "\" "
+ "master:gh-pages " + "> /dev/null 2>&1";
if (plugins.smartenv.getEnv().isTravis) {
if (plugins.smartenv.getEnv().isTravis && configArg.docs && configArg.docs.publish) {
plugins.beautylog.log("now publishing docs to GitHub");
if (!plugins.shelljs.which('git')) {
plugins.beautylog.error('Git is not installed');

View File

@ -9,5 +9,8 @@
"./subts2/",
"./customdir"
],
"coveralls":true
"coveralls":true,
"docs": {
"publish":true
}
}

View File

@ -39,8 +39,8 @@ var publishDocs = function(configArg){
+ "\"" + gitUrl + "\" "
+ "master:gh-pages " + "> /dev/null 2>&1";
if(plugins.smartenv.getEnv().isTravis){
plugins.beautylog.log("now publishing docs to GitHub")
if(plugins.smartenv.getEnv().isTravis && configArg.docs && configArg.docs.publish){
plugins.beautylog.log("now publishing docs to GitHub");
if (!plugins.shelljs.which('git')) {
plugins.beautylog.error('Git is not installed');
plugins.shelljs.exit(1);