Adding docco support

This commit is contained in:
Jeff Avallone 2015-04-11 13:59:23 -04:00
parent 1b3a1819c8
commit 72e5647f21
3 changed files with 21 additions and 2 deletions

1
.gitignore vendored
View File

@ -1,3 +1,4 @@
node_modules node_modules
.sass-cache .sass-cache
build build
docs

View File

@ -9,10 +9,26 @@ function errorHandler() {
}); });
} }
gulp.task('default', ['server'], function() { gulp.task('default', ['server', 'docs'], function() {
gulp.watch(config.globs.other, ['static']); gulp.watch(config.globs.other, ['static']);
gulp.watch([config.globs.html, config.templateFile, config.globs.sass], ['markup']); gulp.watch([config.globs.html, config.templateFile, config.globs.sass], ['markup']);
gulp.watch(config.globs.js, ['browserify']); gulp.watch(config.globs.js, ['browserify', 'docs']);
});
gulp.task('docs', ['docs:files'], function() {
var folderToc = require('folder-toc');
folderToc('./docs', {
filter: '*.html'
});
});
gulp.task('docs:files', function() {
var docco = require('gulp-docco');
return gulp.src(config.globs.js)
.pipe(docco())
.pipe(gulp.dest('./docs'));
}); });
gulp.task('server', ['build'], function() { gulp.task('server', ['build'], function() {

View File

@ -13,9 +13,11 @@
"browserify": "^6.3.4", "browserify": "^6.3.4",
"canopy": "^0.2.0", "canopy": "^0.2.0",
"es6ify": "^1.5.1", "es6ify": "^1.5.1",
"folder-toc": "^0.1.0",
"gulp": "^3.8.10", "gulp": "^3.8.10",
"gulp-compass": "^2.0.3", "gulp-compass": "^2.0.3",
"gulp-connect": "^2.2.0", "gulp-connect": "^2.2.0",
"gulp-docco": "0.0.4",
"gulp-notify": "^2.0.1", "gulp-notify": "^2.0.1",
"gulp-plumber": "^0.6.6", "gulp-plumber": "^0.6.6",
"gulp-tap": "^0.1.3", "gulp-tap": "^0.1.3",