documentation-theme-light icon indicating copy to clipboard operation
documentation-theme-light copied to clipboard

Theme not working with the latest documentationjs code

Open jainanshul opened this issue 9 years ago • 3 comments

I get the following error when using this theme with the latest documentationjs code.

docs/node_modules/documentation/lib/commands/build.js:60
      throw err;
      ^

TypeError: theme is not a function
    at Object.makeHTML [as html] (docs/node_modules/documentation/lib/output/html.js:21:3)
    at onDocumented (docs/node_modules/documentation/lib/commands/build.js:63:47)
    at docs/node_modules/documentation/index.js:101:7
    at docs/node_modules/documentation/lib/input/dependency.js:45:5
    at ConcatStream.<anonymous> (docs/node_modules/documentation/node_modules/concat-stream/index.js:36:43)
    at emitNone (events.js:72:20)
    at ConcatStream.emit (events.js:166:7)
    at finishMaybe (docs/node_modules/documentation/node_modules/concat-stream/node_modules/readable-stream/lib/_stream_writable.js:475:14)
    at endWritable (docs/node_modules/documentation/node_modules/concat-stream/node_modules/readable-stream/lib/_stream_writable.js:485:3)
    at ConcatStream.Writable.end (docs/node_modules/documentation/node_modules/concat-stream/node_modules/readable-stream/lib/_stream_writable.js:455:41)

jainanshul avatar May 12 '16 17:05 jainanshul

The error seems to be in https://github.com/documentationjs/documentation-theme-light/blob/master/index.js#L1 as it cannot be void, it needs to be a function with these signature:

module.exports = function (comments, options, callback) { }

jtorresfabra avatar Jun 26 '16 11:06 jtorresfabra

@jtorresfabra does not work with module.exports = function (comments, options, callback) {} either.

pronebird avatar Mar 13 '17 11:03 pronebird

here is the fixed version https://github.com/ur300/documentation-theme-light

ur300 avatar May 01 '19 09:05 ur300