From bf34b01367985c96893d11a030abd46a66b97b70 Mon Sep 17 00:00:00 2001 From: devlinjd Date: Sat, 21 Nov 2015 03:10:11 -0500 Subject: [PATCH] Add YUIDoc support --- .gitignore | 1 + Gruntfile.js | 22 ++++++++++++++++++++-- 2 files changed, 21 insertions(+), 2 deletions(-) diff --git a/.gitignore b/.gitignore index 3d972f0..ce751fe 100644 --- a/.gitignore +++ b/.gitignore @@ -1,2 +1,3 @@ node_modules/ tests/sandbox/ +docs/ diff --git a/Gruntfile.js b/Gruntfile.js index 56169c7..90941b6 100644 --- a/Gruntfile.js +++ b/Gruntfile.js @@ -15,15 +15,33 @@ module.exports = function (grunt) { reporter: 'spec' }, all: { src: ['tests/*.js'] } + }, + + yuidoc: { + compile: { + name: '<%= pkg.name %>', + description: '<%= pkg.description %>', + version: '<%= pkg.version %>', + url: '<%= pkg.homepage %>', + options: { + paths: 'src/', + //themedir: 'path/to/custom/theme/', + outdir: 'docs/' + } + } } }; grunt.initConfig( opts ); grunt.loadNpmTasks('grunt-simple-mocha'); - grunt.registerTask('test', 'Test the FluentLib library.', function( config ) { + grunt.loadNpmTasks('grunt-contrib-yuidoc'); + grunt.registerTask('test', 'Test the FluentCV library.', function( config ) { grunt.task.run( ['simplemocha:all'] ); }); - grunt.registerTask('default', [ 'test' ]); + grunt.registerTask('document', 'Generate FluentCV library documentation.', function( config ) { + grunt.task.run( ['yuidoc'] ); + }); + grunt.registerTask('default', [ 'test', 'yuidoc' ]); };