File tree Expand file tree Collapse file tree 1 file changed +4
-3
lines changed Expand file tree Collapse file tree 1 file changed +4
-3
lines changed Original file line number Diff line number Diff line change @@ -11,7 +11,8 @@ module.exports = function(grunt) {
11
11
12
12
var path = require ( 'path' ) ,
13
13
chalk = require ( 'chalk' ) ,
14
- documentation = require ( 'documentation' ) ;
14
+ documentation = require ( 'documentation' ) . build || require ( 'documentation' ) ,
15
+ formats = require ( 'documentation' ) . formats ;
15
16
16
17
grunt . registerMultiTask ( 'documentation' , 'Use Grunt with documentation to generate great documentation for your JavaScript projects.' , function ( ) {
17
18
var options = this . options ( {
@@ -22,9 +23,9 @@ module.exports = function(grunt) {
22
23
order : [ ]
23
24
} ) ;
24
25
25
- var formatter = documentation . formats [ options . format ] ;
26
+ var formatter = formats [ options . format ] ;
26
27
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 ( ', ' ) ) ;
28
29
}
29
30
30
31
var docOptions = {
You can’t perform that action at this time.
0 commit comments