mirror of
https://github.com/facebook/docusaurus.git
synced 2025-08-04 01:09:20 +02:00
misc: convert all internal scripts to ESM (#6286)
* misc: convert all internal scripts to ESM * fixes * fix * fixes * fix! * complete eslint * more move * fix! * This looks better? * Final ones
This commit is contained in:
parent
bcc05e243f
commit
4fad1ce0cd
66 changed files with 412 additions and 374 deletions
|
@ -1,4 +1,4 @@
|
|||
copyUntypedFiles.js
|
||||
copyUntypedFiles.mjs
|
||||
.tsbuildinfo
|
||||
tsconfig*
|
||||
__tests__
|
||||
|
|
|
@ -6,21 +6,20 @@
|
|||
*/
|
||||
|
||||
import {merge} from 'lodash';
|
||||
import {ThemeConfigSchema, DEFAULT_CONFIG} from '../validateThemeConfig';
|
||||
|
||||
const {ThemeConfigSchema, DEFAULT_CONFIG} = require('../validateThemeConfig');
|
||||
import {normalizeThemeConfig} from '@docusaurus/utils-validation';
|
||||
import theme from 'prism-react-renderer/themes/github';
|
||||
import darkTheme from 'prism-react-renderer/themes/dracula';
|
||||
|
||||
const {normalizeThemeConfig} = require('@docusaurus/utils-validation');
|
||||
const theme = require('prism-react-renderer/themes/github');
|
||||
const darkTheme = require('prism-react-renderer/themes/dracula');
|
||||
|
||||
function testValidateThemeConfig(partialThemeConfig) {
|
||||
function testValidateThemeConfig(partialThemeConfig: Record<string, unknown>) {
|
||||
return normalizeThemeConfig(ThemeConfigSchema, {
|
||||
...DEFAULT_CONFIG,
|
||||
...partialThemeConfig,
|
||||
});
|
||||
}
|
||||
|
||||
function testOk(partialThemeConfig) {
|
||||
function testOk(partialThemeConfig: Record<string, unknown>) {
|
||||
expect(
|
||||
testValidateThemeConfig({...DEFAULT_CONFIG, ...partialThemeConfig}),
|
||||
).toEqual({
|
Loading…
Add table
Add a link
Reference in a new issue