fix: js 执行崩溃
Some checks failed
continuous-integration/drone/push Build is failing

- deps and types.
- use pnpm instead of npm.
- fix cpu 100%.
This commit is contained in:
2022-10-08 22:45:31 +08:00
parent 85fa2ae57f
commit 2ed23c4327
9 changed files with 8033 additions and 22959 deletions

View File

@ -62,7 +62,7 @@ export async function getFileBySlug<T>(type: 'authors' | 'blog', slug: string |
source,
// mdx imports can be automatically source from the components directory
cwd: path.join(root, 'components'),
mdxOptions(options, frontmatter) {
xdmOptions(options, frontmatter) {
// this is the recommended way to add custom remark/rehype plugins:
// The syntax might look weird, but it protects you in case we add/remove
// plugins in the future.

View File

@ -1,5 +1,4 @@
import { Parent } from 'unist'
import { visit } from 'unist-util-visit'
import { visit, Parent } from 'unist-util-visit'
export default function remarkCodeTitles() {
return (tree: Parent & { lang?: string }) =>

View File

@ -1,6 +1,5 @@
import { Parent } from 'unist'
import { VFile } from 'vfile'
import { visit } from 'unist-util-visit'
import { visit, Parent } from 'unist-util-visit'
import { load } from 'js-yaml'
export default function extractFrontmatter() {

View File

@ -1,5 +1,5 @@
import { Parent, Node, Literal } from 'unist'
import { visit } from 'unist-util-visit'
import { Literal } from 'unist'
import { visit, Parent, Node } from 'unist-util-visit'
import sizeOf from 'image-size'
import fs from 'fs'