Skip to content

Commit a0dd38b

Browse files
committed
handle version incompatibilities
Fixes #6
1 parent 1c6915d commit a0dd38b

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

tasks/documentation.js

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,8 @@ module.exports = function(grunt) {
1111

1212
var path = require('path'),
1313
chalk = require('chalk'),
14-
documentation = require('documentation');
14+
documentation = require('documentation').build || require('documentation'),
15+
formats = require('documentation').formats;
1516

1617
grunt.registerMultiTask('documentation', 'Use Grunt with documentation to generate great documentation for your JavaScript projects.', function() {
1718
var options = this.options({
@@ -22,9 +23,9 @@ module.exports = function(grunt) {
2223
order: []
2324
});
2425

25-
var formatter = documentation.formats[options.format];
26+
var formatter = formats[options.format];
2627
if (!formatter) {
27-
throw new Error('invalid format given: valid options are ' + Object.keys(documentation.formats).join(', '));
28+
throw new Error('invalid format given: valid options are ' + Object.keys(formats).join(', '));
2829
}
2930

3031
var docOptions = {

0 commit comments

Comments
 (0)