Skip to content

Documentation fails to build when using this theme #6

Open
@twiertzema

Description

@twiertzema

I pulled down this project as a zip and placed it at the root of my project. Then, based on what I could piece together from the documentation and reading between the lines, I have tried using this theme with the following Node script:

#!/usr/bin/node

const documentation = require('documentation');
const streamArray = require('stream-array');
const vfs = require('vinyl-fs');

documentation.build(['src/**'], {})
    .then(res => documentation.formats.html(res, { theme: 'documentation-theme-light-master' }))
    .then(output => streamArray(output).pipe(vfs.dest('./docs')));

The relevant file structure is as follows:

node_modules/..
src/..
scripts/build-documentation.js (the above script)
documentation-theme-light-master/..
package.json

When I run documentation in this project, I receive the following error:

(node:18329) UnhandledPromiseRejectionWarning: Unhandled promise rejection (rejection id: 3): TypeError: require(...) is not a function
(node:18329) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.

The result is that the documentation fails to build and there is no output.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions