How to use the gemini-configparser.section function in gemini-configparser

To help you get started, we’ve selected a few gemini-configparser 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 gemini-testing / hermione / lib / config / options.js View on Github external
'use strict';

const _ = require('lodash');
const configparser = require('gemini-configparser');
const browserOptions = require('./browser-options');
const defaults = require('./defaults');
const optionsBuilder = require('./options-builder');

const options = optionsBuilder(_.propertyOf(defaults));

const section = configparser.section;
const map = configparser.map;

const coreOptions = require('gemini-core').config.options;

const ENV_PREFIX = `${require('../../package').name}_`;

const rootSection = section(_.extend(browserOptions.getTopLevel(), {

    browsers: map(section(browserOptions.getPerBrowser())),

    prepareEnvironment: options.optionalFunction('prepareEnvironment'),

    system: section({
        debug: options.boolean('debug'),

        mochaOpts: options.optionalObject('mochaOpts'),
github gemini-testing / gemini / lib / config / options.js View on Github external
const configparser = require('gemini-configparser');
const _ = require('lodash');
const GeminiError = require('../errors/gemini-error');
const util = require('./util');

const browserOptions = require('./browser-options');
const coreOptions = require('gemini-core').config.options;
const ENV_PREFIX = `${require('../../package').name}_`;

const is = util.is;
const anyObject = util.anyObject;
const resolveWithProjectRoot = util.resolveWithProjectRoot;
const booleanOption = util.booleanOption;
const positiveIntegerOption = util.positiveIntegerOption;
const root = configparser.root;
const section = configparser.section;
const option = configparser.option;
const map = configparser.map;

module.exports = root(
    section(_.extend(browserOptions.getTopLevel(), {
        system: section({
            projectRoot: option({
                validate: is('string'),
                map: _.ary(path.resolve, 1)
            }),

            sourceRoot: option({
                validate: is('string'),
                map: resolveWithProjectRoot,
                defaultValue: (config) => config.system.projectRoot
            }),
github rakutentech / docpub / lib / config / scheme.js View on Github external
const configParser = require('gemini-configparser');

const root = configParser.root;
const section = configParser.section;
const option = configParser.option;

const shouldBeBoolean = require('../metadata/validation-utils').shouldBeBoolean;
const shouldBeString = require('../metadata/validation-utils').shouldBeString;

const ENV_PREFIX = `${require('../../package').name}_`;

/**
 * Parsing scheme for the config. Determines config structure.
 * Raw values parsing process:
 * 1. Override JSON values with CLI and ENV variables
 * 2. Ensure requred fields presented
 * 3. Validate values
 * 4. Map values
 * Current structure:
 * ```

gemini-configparser

Config parser module for gemini

MIT
Latest version published 3 months ago

Package Health Score

63 / 100
Full package analysis

Similar packages