mirror of
https://github.com/facebook/docusaurus.git
synced 2025-08-04 01:09:20 +02:00
refactor: convert all fs methods to async (#6725)
* refactor: convert all fs methods to async * fix snap
This commit is contained in:
parent
c0b3c9af65
commit
c6d0d812eb
46 changed files with 518 additions and 429 deletions
|
@ -36,13 +36,13 @@
|
|||
"algoliasearch-helper": "^3.7.0",
|
||||
"clsx": "^1.1.1",
|
||||
"eta": "^1.12.3",
|
||||
"fs-extra": "^10.0.0",
|
||||
"lodash": "^4.17.21",
|
||||
"tslib": "^2.3.1",
|
||||
"utility-types": "^3.10.0"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@docusaurus/module-type-aliases": "2.0.0-beta.15",
|
||||
"fs-extra": "^10.0.0"
|
||||
"@docusaurus/module-type-aliases": "2.0.0-beta.15"
|
||||
},
|
||||
"peerDependencies": {
|
||||
"react": "^16.8.4 || ^17.0.0",
|
||||
|
|
|
@ -6,7 +6,7 @@
|
|||
*/
|
||||
|
||||
import path from 'path';
|
||||
import fs from 'fs';
|
||||
import fs from 'fs-extra';
|
||||
import {defaultConfig, compile} from 'eta';
|
||||
import {normalizeUrl} from '@docusaurus/utils';
|
||||
import {readDefaultCodeTranslationMessages} from '@docusaurus/theme-translations';
|
||||
|
@ -76,7 +76,7 @@ export default function themeSearchAlgolia(context: LoadContext): Plugin<void> {
|
|||
const siteUrl = normalizeUrl([url, baseUrl]);
|
||||
|
||||
try {
|
||||
fs.writeFileSync(
|
||||
await fs.writeFile(
|
||||
path.join(outDir, OPEN_SEARCH_FILENAME),
|
||||
renderOpenSearchTemplate({
|
||||
title,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue