Skip to content

Commit bf9652c

Browse files
committed
Merge branch 'fix-major-version-incompatibility' of https://github.com/ianwremmel/grunt-documentation into ianwremmel-fix-major-version-incompatibility
2 parents bf5a316 + a0dd38b commit bf9652c

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)