mirror of
https://github.com/facebook/docusaurus.git
synced 2025-07-28 05:58:38 +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
|
@ -5,7 +5,7 @@
|
|||
* LICENSE file in the root directory of this source tree.
|
||||
*/
|
||||
|
||||
import {join} from 'path';
|
||||
import path from 'path';
|
||||
import remark from 'remark';
|
||||
import mdx from 'remark-mdx';
|
||||
import vfile from 'to-vfile';
|
||||
|
@ -13,8 +13,8 @@ import plugin from '../index';
|
|||
import headings from '../../headings/index';
|
||||
|
||||
const processFixture = async (name, options?) => {
|
||||
const path = join(__dirname, '__fixtures__', `${name}.md`);
|
||||
const file = await vfile.read(path);
|
||||
const filePath = path.join(__dirname, '__fixtures__', `${name}.md`);
|
||||
const file = await vfile.read(filePath);
|
||||
const result = await remark()
|
||||
.use(headings)
|
||||
.use(mdx)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue