mirror of
https://github.com/facebook/docusaurus.git
synced 2025-05-23 14:06:59 +02:00
refactor: prefer fs.outputFile to ensureDir + writeFile (#6880)
* refactor: prefer fs.outputFile to ensureDir + writeFile * fix test * fix
This commit is contained in:
parent
73df485aec
commit
23a34c1a07
15 changed files with 66 additions and 108 deletions
|
@ -13,7 +13,7 @@ import {
|
|||
mapAsyncSequential,
|
||||
readOutputHTMLFile,
|
||||
} from '@docusaurus/utils';
|
||||
import cheerio from 'cheerio';
|
||||
import {load as cheerioLoad} from 'cheerio';
|
||||
import type {DocusaurusConfig} from '@docusaurus/types';
|
||||
import path from 'path';
|
||||
import fs from 'fs-extra';
|
||||
|
@ -78,7 +78,7 @@ async function generateBlogFeed({
|
|||
outDir,
|
||||
siteConfig.trailingSlash,
|
||||
);
|
||||
const $ = cheerio.load(content);
|
||||
const $ = cheerioLoad(content);
|
||||
|
||||
const feedItem: FeedItem = {
|
||||
title: metadataTitle,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue