diff --git a/gulp/tasks/jsdoc.js b/gulp/tasks/jsdoc.js index e69de29..65a0d50 100644 --- a/gulp/tasks/jsdoc.js +++ b/gulp/tasks/jsdoc.js @@ -0,0 +1,38 @@ +var gulp = require('gulp'), + jsdoc = require('gulp-jsdoc'), + del = require('del'); + + +gulp.task('jsdocs',function(){ + + // here we use a globbing pattern to match everything inside the 'documentation' folder + var folders = [ + './documentation/**' + ]; + + var docStrapTemplate = { + path : "ink-docstrap", + // the attribute for 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 its contributors", + navType : "vertical", + theme : "readable", + 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) ) + } + + del(folders,deleteCallback); + +}); \ No newline at end of file diff --git a/gulp/tasks/jsdoc.js b/gulp/tasks/jsdoc.js index e69de29..65a0d50 100644 --- a/gulp/tasks/jsdoc.js +++ b/gulp/tasks/jsdoc.js @@ -0,0 +1,38 @@ +var gulp = require('gulp'), + jsdoc = require('gulp-jsdoc'), + del = require('del'); + + +gulp.task('jsdocs',function(){ + + // here we use a globbing pattern to match everything inside the 'documentation' folder + var folders = [ + './documentation/**' + ]; + + var docStrapTemplate = { + path : "ink-docstrap", + // the <title> attribute for 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 its contributors", + navType : "vertical", + theme : "readable", + 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) ) + } + + del(folders,deleteCallback); + +}); \ No newline at end of file diff --git a/gulpfile.js b/gulpfile.js index 3d29ac5..9376917 100644 --- a/gulpfile.js +++ b/gulpfile.js @@ -30,3 +30,5 @@ // default task gulp.task('default', ['jshint', 'build']); + +gulp.task('docs',['jsdocs']); \ No newline at end of file diff --git a/gulp/tasks/jsdoc.js b/gulp/tasks/jsdoc.js index e69de29..65a0d50 100644 --- a/gulp/tasks/jsdoc.js +++ b/gulp/tasks/jsdoc.js @@ -0,0 +1,38 @@ +var gulp = require('gulp'), + jsdoc = require('gulp-jsdoc'), + del = require('del'); + + +gulp.task('jsdocs',function(){ + + // here we use a globbing pattern to match everything inside the 'documentation' folder + var folders = [ + './documentation/**' + ]; + + var docStrapTemplate = { + path : "ink-docstrap", + // the <title> attribute for 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 its contributors", + navType : "vertical", + theme : "readable", + 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) ) + } + + del(folders,deleteCallback); + +}); \ No newline at end of file diff --git a/gulpfile.js b/gulpfile.js index 3d29ac5..9376917 100644 --- a/gulpfile.js +++ b/gulpfile.js @@ -30,3 +30,5 @@ // default task gulp.task('default', ['jshint', 'build']); + +gulp.task('docs',['jsdocs']); \ No newline at end of file diff --git a/package.json b/package.json index 0f6b10f..c070362 100644 --- a/package.json +++ b/package.json @@ -26,6 +26,9 @@ "del": "^1.1.0", "gulp": "^3.8.10", "gulp-cached": "^1.0.1", + "gulp-concat": "^2.5.2", + "gulp-debug": "^2.0.0", + "gulp-jsdoc": "^0.1.4", "gulp-jshint": "^1.9.0", "gulp-plumber": "^0.6.6", "gulp-rename": "^1.2.0",