Example #1
0
            },
        },
    },
};

export const meta = {
    settings: {
        dev: {
            __meta: {
                override: 'roc-abstract-package-base-dev',
            },
            browsersync: {
                description: 'Settings for Browsersync.',
                enabled: {
                    description: 'If Browsersync should be enabled.',
                    validator: required(isBoolean),
                },
                options: {
                    open: {
                        description: 'Decide which URL to open automatically when Browsersync starts. ' +
                            'Defaults to "local" if none set. Can be true, local, external, ' +
                            'ui, ui-external, tunnel or false.',
                        validator: required(oneOf(/^(external|ui|ui-external|tunnel)$/, isBoolean)),
                    },
                    host: {
                        description: 'The host that Browsersync should use, will be automatic by default.',
                        validator: notEmpty(isString),
                    },
                    port: {
                        description: 'The port that Browsersync should start on, should be a range of at least 2.',
                        validator: required(isInteger),
export default {
    settings: {
        build: {
            assets: {
                images: {
                    __meta: {
                        description: 'Settings for image asset related things.',
                    },
                    urlLoader: {
                        __meta: {
                            description: 'Settings for https://github.com/webpack/url-loader',
                        },
                        filetypes: {
                            description: 'The filetypes that should be used together with url-loader.',
                            validator: required(notEmpty(isArray(isString))),
                        },
                        options: {
                            __meta: {
                                description: 'Options that will be used as query parameters.',
                            },
                            limit: {
                                description: 'The maximum size (in bytes) for base64 encoding an image.',
                                validator: required(isInteger),
                            },
                        },
                    },
                    fileLoader: {
                        __meta: {
                            description: 'Settings for https://github.com/webpack/file-loader',
                        },
    required,
} from 'roc/validators';

export default {
    settings: {
        runtime: {
            debug: {
                server: {
                    description: 'Filter for debug messages that should be shown for the server, see ' +
                        'https://npmjs.com/package/debug.',
                    validator: isString,
                },
            },
            port: {
                description: 'Port for the server to use.',
                validator: required(notEmpty(isInteger)),
            },
            https: {
                port: {
                    description: 'Port for the server to use for HTTPS. If none is defined it will not ' +
                        'launch in HTTPS.',
                    validator: notEmpty(isInteger),
                },
                key: {
                    description: 'The key file to use when using HTTPS. If none is provided and if running ' +
                        'in dev a file will be provided automatically.',
                    validator: notEmpty(isPath),
                },
                cert: {
                    description: 'The certificate file to use when using HTTPS. If none is provided and ' +
                        'if running in dev a file will be provided automatically.',