Skip to content

Commit

Permalink
chore: use @nuxtjs/mdc
Browse files Browse the repository at this point in the history
  • Loading branch information
farnabaz committed Aug 28, 2023
1 parent aa61d9f commit ba4d011
Show file tree
Hide file tree
Showing 5 changed files with 114 additions and 56 deletions.
2 changes: 1 addition & 1 deletion package.json
Expand Up @@ -54,7 +54,7 @@
"mdurl": "^1.0.1",
"micromark": "^4.0.0",
"micromark-util-sanitize-uri": "^2.0.0",
"nuxt-mdc": "npm:nuxt-mdc-edge@latest",
"@nuxtjs/mdc": "^0.1.0",
"ohash": "^1.1.3",
"pathe": "^1.1.1",
"scule": "^1.0.0",
Expand Down
160 changes: 109 additions & 51 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions src/module.ts
Expand Up @@ -460,7 +460,7 @@ export default defineNuxtModule<ModuleOptions>({

if (
c.filePath.includes('@nuxt/content/dist') ||
c.filePath.includes('nuxt-mdc/dist') ||
c.filePath.includes('@nuxtjs/mdc/dist') ||
c.filePath.includes('nuxt/dist/app') ||
c.filePath.includes('NuxtWelcome')
) {
Expand Down Expand Up @@ -658,7 +658,7 @@ export default defineNuxtModule<ModuleOptions>({
}
}

await installModule('nuxt-mdc', nuxtMDCOptions)
await installModule('@nuxtjs/mdc', nuxtMDCOptions)

nuxt.options.runtimeConfig.public.content = defu(nuxt.options.runtimeConfig.public.content, {
locales: options.locales,
Expand Down
2 changes: 1 addition & 1 deletion src/runtime/composables/useUnwrap.ts
@@ -1,4 +1,4 @@
import { unwrap, flatUnwrap } from 'nuxt-mdc/dist/runtime/utils/node'
import { unwrap, flatUnwrap } from '@nuxtjs/mdc/dist/runtime/utils/node'

export const useUnwrap = () => ({
unwrap,
Expand Down
2 changes: 1 addition & 1 deletion src/runtime/transformers/markdown.ts
@@ -1,4 +1,4 @@
import { parseMarkdown } from 'nuxt-mdc/dist/runtime'
import { parseMarkdown } from '@nuxtjs/mdc/dist/runtime'
import { type State } from 'mdast-util-to-hast'
import { normalizeUri } from 'micromark-util-sanitize-uri'
import { type Properties, type Element } from 'hast'
Expand Down

0 comments on commit ba4d011

Please sign in to comment.