diff --git a/gulp/tasks/jsdoc.js b/gulp/tasks/jsdoc.js index b809f13..208c797 100644 --- a/gulp/tasks/jsdoc.js +++ b/gulp/tasks/jsdoc.js @@ -1,44 +1,11 @@ -var gulp = require('gulp'), - jsdoc = require('gulp-jsdoc'), - del = require('del'); - +var gulp = require('gulp'), + exec = require('child_process').exec; -gulp.task('jsdocs',function(){ +gulp.task('jsdoc', function (done) { + exec('npm docs', function (err, stdout, stderr) { + console.log(stdout); + console.log(stderr); - // here we use a globbing pattern to match everything inside the 'documentation' folder - var folders = [ - './documentation/**' - ]; - - - var docStrapTemplate = { - // docstrap is included in gulp-jsdoc, thanks guys - path : "ink-docstrap", - // the of the web page - systemName : "The official pixi.js documentaion", - // A left-aligned message on the footer - footer : "Made with ♥ by <a href='http://goodboydigital.com'>Goodboy Digital</a>", - // The centred copyright message - copyright : "© Goodboy Digital Ltd and all the pixi.js contributors", - navType : "vertical", - theme : "readable", - // TODO add - analytics : {"ua":"UA-XXXXX-XXX", "domain":"XXXX"}, - outputSourceFiles : true, - linenums : true, - collapseSymbols : false, - inverseNav : false - } - - function deleteCallback(error,deletedFiles) { - // When the previous docs are deleted, run gulp-jsdoc - // - return gulp.src('./src/core/display/*.js') - .pipe( jsdoc('./documentation',docStrapTemplate) ) - } - - - // deletes the docs folder and re-generates the documentation - del(folders,deleteCallback); - -}); \ No newline at end of file + done(err); + }); +}); diff --git a/gulp/tasks/jsdoc.js b/gulp/tasks/jsdoc.js index b809f13..208c797 100644 --- a/gulp/tasks/jsdoc.js +++ b/gulp/tasks/jsdoc.js @@ -1,44 +1,11 @@ -var gulp = require('gulp'), - jsdoc = require('gulp-jsdoc'), - del = require('del'); - +var gulp = require('gulp'), + exec = require('child_process').exec; -gulp.task('jsdocs',function(){ +gulp.task('jsdoc', function (done) { + exec('npm docs', function (err, stdout, stderr) { + console.log(stdout); + console.log(stderr); - // here we use a globbing pattern to match everything inside the 'documentation' folder - var folders = [ - './documentation/**' - ]; - - - var docStrapTemplate = { - // docstrap is included in gulp-jsdoc, thanks guys - path : "ink-docstrap", - // the <title> of the web page - systemName : "The official pixi.js documentaion", - // A left-aligned message on the footer - footer : "Made with ♥ by <a href='http://goodboydigital.com'>Goodboy Digital</a>", - // The centred copyright message - copyright : "© Goodboy Digital Ltd and all the pixi.js contributors", - navType : "vertical", - theme : "readable", - // TODO add - analytics : {"ua":"UA-XXXXX-XXX", "domain":"XXXX"}, - outputSourceFiles : true, - linenums : true, - collapseSymbols : false, - inverseNav : false - } - - function deleteCallback(error,deletedFiles) { - // When the previous docs are deleted, run gulp-jsdoc - // - return gulp.src('./src/core/display/*.js') - .pipe( jsdoc('./documentation',docStrapTemplate) ) - } - - - // deletes the docs folder and re-generates the documentation - del(folders,deleteCallback); - -}); \ No newline at end of file + done(err); + }); +}); diff --git a/gulp/util/jsdoc.conf.json b/gulp/util/jsdoc.conf.json index adb649a..b102010 100644 --- a/gulp/util/jsdoc.conf.json +++ b/gulp/util/jsdoc.conf.json @@ -26,7 +26,7 @@ "outputSourceFiles" : true }, "systemName" : "PIXI", - "footer" : "", + "footer" : "Made with ♥ by <a href='http://goodboydigital.com'>Goodboy Digital</a>", "copyright" : "PIXI Copyright © 2013-2015 Mat Groves.", "navType" : "vertical", "theme" : "cerulean",