diff --git a/Gruntfile.coffee b/Gruntfile.coffee index 8dbe91286..960fbfd92 100644 --- a/Gruntfile.coffee +++ b/Gruntfile.coffee @@ -210,6 +210,7 @@ module.exports = (grunt) -> nof = require.resolve('.bin/nof') spawn({cmd: nof, args: ['spec', 'src']}, @async()) + grunt.loadTasks('tasks') grunt.registerTask('compile', ['coffee', 'less', 'cson']) grunt.registerTask('lint', ['coffeelint', 'csslint', 'lesslint']) grunt.registerTask('ci', ['lint', 'partial-clean', 'update-atom-shell', 'build', 'test']) diff --git a/tasks/docs.coffee b/tasks/docs.coffee new file mode 100644 index 000000000..3d540a6a7 --- /dev/null +++ b/tasks/docs.coffee @@ -0,0 +1,22 @@ +path = require 'path' + +module.exports = (grunt) -> + cmd = path.join('node_modules', '.bin', 'coffee') + commonArgs = [path.join('node_modules', '.bin', 'biscotto'), '--'] + opts = + stdio: 'inherit' + + grunt.registerTask 'build-docs', 'Builds the API docs in src/app', -> + done = @async() + args = [commonArgs..., '-o', 'docs/api', 'src/app/'] + grunt.util.spawn({cmd, args, opts}, done) + + grunt.registerTask 'lint-docs', 'Generate stats about the doc coverage', -> + done = @async() + args = [commonArgs..., '--statsOnly', 'src/app/'] + grunt.util.spawn({cmd, args, opts}, done) + + grunt.registerTask 'missing-docs', 'Generate stats about the doc coverage', -> + done = @async() + args = [commonArgs..., '--listMissing', 'src/app/'] + grunt.util.spawn({cmd, args, opts}, done)