mirror of
https://github.com/facebook/docusaurus.git
synced 2025-07-30 06:50:36 +02:00
refactor: unify export directive style (#6751)
This commit is contained in:
parent
0c807b3501
commit
0d14470d54
105 changed files with 315 additions and 510 deletions
|
@ -10,7 +10,6 @@
|
|||
// https://github.com/FormidableLabs/react-live#what-bundle-size-can-i-expect
|
||||
import {
|
||||
transform as bubleTransform,
|
||||
features as bubleFeatures,
|
||||
type TransformOptions,
|
||||
type TransformOutput,
|
||||
} from '@philpl/buble';
|
||||
|
@ -18,7 +17,7 @@ import {
|
|||
// This file is designed to mimic what's written in
|
||||
// https://github.com/kitten/buble/blob/mini/src/index.js, with custom transforms options,
|
||||
// so that webpack can consume it correctly.
|
||||
export {bubleFeatures as features};
|
||||
export {features} from '@philpl/buble';
|
||||
|
||||
export function transform(
|
||||
source: string,
|
||||
|
|
|
@ -8,11 +8,11 @@
|
|||
import {Joi} from '@docusaurus/utils-validation';
|
||||
import type {ThemeConfig, Validate, ValidationResult} from '@docusaurus/types';
|
||||
|
||||
const DEFAULT_CONFIG = {
|
||||
export const DEFAULT_CONFIG = {
|
||||
playgroundPosition: 'bottom',
|
||||
};
|
||||
|
||||
const Schema = Joi.object({
|
||||
export const Schema = Joi.object({
|
||||
liveCodeBlock: Joi.object({
|
||||
playgroundPosition: Joi.string()
|
||||
.equal('top', 'bottom')
|
||||
|
@ -22,7 +22,7 @@ const Schema = Joi.object({
|
|||
.default(DEFAULT_CONFIG),
|
||||
});
|
||||
|
||||
function validateThemeConfig({
|
||||
export function validateThemeConfig({
|
||||
validate,
|
||||
themeConfig,
|
||||
}: {
|
||||
|
@ -31,5 +31,3 @@ function validateThemeConfig({
|
|||
}): ValidationResult<ThemeConfig> {
|
||||
return validate(Schema, themeConfig);
|
||||
}
|
||||
|
||||
export {DEFAULT_CONFIG, Schema, validateThemeConfig};
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue