21 lines
737 B
TypeScript
21 lines
737 B
TypeScript
|
|
/**
|
||
|
|
* Copyright (c) Facebook, Inc. and its affiliates.
|
||
|
|
*
|
||
|
|
* This source code is licensed under the MIT license found in the
|
||
|
|
* LICENSE file in the root directory of this source tree.
|
||
|
|
*/
|
||
|
|
import * as Joi from '@hapi/joi';
|
||
|
|
import {PluginOptions} from './types';
|
||
|
|
|
||
|
|
export const DEFAULT_OPTIONS: PluginOptions = {
|
||
|
|
path: 'src/pages', // Path to data on filesystem, relative to site dir.
|
||
|
|
routeBasePath: '', // URL Route.
|
||
|
|
include: ['**/*.{js,jsx,ts,tsx}'], // Extensions to include.
|
||
|
|
};
|
||
|
|
|
||
|
|
export const PluginOptionSchema = Joi.object({
|
||
|
|
path: Joi.string().default(DEFAULT_OPTIONS.path),
|
||
|
|
routeBasePath: Joi.string().default(DEFAULT_OPTIONS.routeBasePath),
|
||
|
|
include: Joi.array().items(Joi.string()).default(DEFAULT_OPTIONS.include),
|
||
|
|
});
|