How to use the @jsdoc/core.config.loadSync function in @jsdoc/core

To help you get started, we’ve selected a few @jsdoc/core examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github jsdoc / jsdoc / packages / jsdoc / cli.js View on Github external
try {
            env.opts = engine.parseFlags(env.args);
        }
        catch (e) {
            props.shouldPrintHelp = true;
            cli.exit(
                1,
                `${e.message}\n`
            );

            return cli;
        }

        try {
            conf = config.loadSync(env.opts.configure);
            env.conf = conf.config;
        }
        catch (e) {
            cli.exit(
                1,
                `Cannot parse the config file ${conf.filepath}: ${e}\n${FATAL_ERROR_MESSAGE}`
            );

            return cli;
        }

        // look for options on the command line, then in the config
        env.opts = _.defaults(env.opts, env.conf.opts);

        return cli;
    };

@jsdoc/core

Core functionality for JSDoc.

Apache-2.0
Latest version published 2 months ago

Package Health Score

77 / 100
Full package analysis