Skip to content

Commit 3cd5c5a

Browse files
authored
feat: slot attributes syntax (#90)
1 parent e96baaa commit 3cd5c5a

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

48 files changed

+5892
-3794
lines changed

.eslintignore

Lines changed: 0 additions & 1 deletion
This file was deleted.

.eslintrc

Lines changed: 0 additions & 6 deletions
This file was deleted.

.gitignore

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,4 +64,5 @@ Temporary Items
6464
.vercel_build_output
6565
.build-*
6666
.env
67-
.netlify
67+
.netlify
68+
.data

docs/.eslintrc.cjs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,6 @@ module.exports = {
33
extends: '@nuxt/eslint-config',
44
rules: {
55
'vue/max-attributes-per-line': 'off',
6-
'vue/multi-word-component-names': 'off'
7-
}
8-
}
6+
'vue/multi-word-component-names': 'off',
7+
},
8+
}

docs/app.config.ts

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -10,35 +10,35 @@ export default defineAppConfig({
1010
nuxt: {
1111
label: 'Nuxt',
1212
icon: 'simple-icons:nuxtdotjs',
13-
href: 'https://nuxt.com'
14-
}
13+
href: 'https://nuxt.com',
14+
},
1515
},
1616

1717
github: {
1818
dir: 'docs/content',
1919
branch: 'main',
2020
repo: 'remark-mdc',
2121
owner: 'nuxtlabs',
22-
edit: true
22+
edit: true,
2323
},
2424

2525
aside: {
2626
level: 0,
2727
collapsed: false,
28-
exclude: []
28+
exclude: [],
2929
},
3030

3131
main: {
3232
padded: true,
33-
fluid: false
33+
fluid: false,
3434
},
3535

3636
header: {
3737
logo: false,
3838
showLinkIcon: true,
3939
exclude: [],
4040
fluid: false,
41-
title: 'Remark MDC'
42-
}
43-
}
44-
})
41+
title: 'Remark MDC',
42+
},
43+
},
44+
})

docs/nuxt.config.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,6 @@ export default defineNuxtConfig({
66
// https://github.com/nuxt-modules/plausible
77
'@nuxtjs/plausible',
88
// https://github.com/nuxt/devtools
9-
'@nuxt/devtools'
10-
]
9+
'@nuxt/devtools',
10+
],
1111
})

eslint.config.mjs

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
// @ts-check
2+
import { createConfigForNuxt } from '@nuxt/eslint-config/flat'
3+
4+
// Run `npx @eslint/config-inspector` to inspect the resolved config interactively
5+
export default createConfigForNuxt({
6+
features: {
7+
// Rules for module authors
8+
tooling: true,
9+
// Rules for formatting
10+
stylistic: true,
11+
},
12+
dirs: {
13+
src: [
14+
'./playground',
15+
'./examples/blog',
16+
],
17+
},
18+
})
19+
.append(
20+
{
21+
rules: {
22+
'@typescript-eslint/no-explicit-any': 'off',
23+
'vue/multi-word-component-names': 'off',
24+
'@typescript-eslint/no-empty-object-type': 'off',
25+
},
26+
},
27+
)

package.json

Lines changed: 24 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -19,44 +19,46 @@
1919
"dev": "nuxi dev playground",
2020
"dev:prepare": "nuxi prepare playground",
2121
"generate": "nuxi generate playground",
22-
"lint": "eslint --ext .js,.ts,.vue .",
22+
"lint": "eslint",
2323
"test:ui": "pnpm lint && vitest --ui --open=false",
2424
"test": "vitest run",
2525
"prepack": "pnpm build",
2626
"release": "release-it"
2727
},
2828
"dependencies": {
29-
"@types/mdast": "^4.0.3",
30-
"@types/unist": "^3.0.2",
29+
"@types/mdast": "^4.0.4",
30+
"@types/unist": "^3.0.3",
3131
"flat": "^6.0.1",
32-
"mdast-util-from-markdown": "^2.0.0",
33-
"mdast-util-to-markdown": "^2.1.0",
34-
"micromark": "^4.0.0",
35-
"micromark-core-commonmark": "^2.0.0",
36-
"micromark-factory-space": "^2.0.0",
37-
"micromark-factory-whitespace": "^2.0.0",
38-
"micromark-util-character": "^2.1.0",
39-
"micromark-util-types": "^2.0.0",
32+
"mdast-util-from-markdown": "^2.0.2",
33+
"mdast-util-to-markdown": "^2.1.2",
34+
"micromark": "^4.0.1",
35+
"micromark-core-commonmark": "^2.0.2",
36+
"micromark-factory-space": "^2.0.1",
37+
"micromark-factory-whitespace": "^2.0.1",
38+
"micromark-util-character": "^2.1.1",
39+
"micromark-util-types": "^2.0.1",
4040
"parse-entities": "^4.0.1",
4141
"scule": "^1.3.0",
42-
"stringify-entities": "^4.0.3",
43-
"unified": "^11.0.4",
42+
"stringify-entities": "^4.0.4",
43+
"unified": "^11.0.5",
4444
"unist-util-visit": "^5.0.0",
4545
"unist-util-visit-parents": "^6.0.1",
46-
"yaml": "^2.4.2"
46+
"yaml": "^2.6.1"
4747
},
4848
"devDependencies": {
49-
"@nuxt/eslint-config": "^0.2.0",
50-
"@nuxt/kit": "^3.11.1",
49+
"@nuxt/eslint-config": "^0.7.2",
50+
"@nuxt/kit": "^3.14.1592",
51+
"@nuxt/ui": "3.0.0-alpha.9",
52+
"@nuxthub/core": "^0.8.7",
5153
"@nuxtjs/eslint-config-typescript": "latest",
5254
"@types/flat": "^5.0.5",
5355
"@types/js-yaml": "^4.0.9",
54-
"@types/node": "^20.11.30",
55-
"eslint": "^8.57.0",
56+
"@types/node": "^22.10.0",
57+
"eslint": "^9.15.0",
5658
"eslint-plugin-nuxt": "latest",
57-
"jiti": "^1.21.0",
58-
"nuxt": "^3.11.1",
59-
"release-it": "^17.1.1",
59+
"jiti": "^2.4.0",
60+
"nuxt": "^3.14.1592",
61+
"release-it": "^17.10.0",
6062
"remark-gfm": "^4.0.0",
6163
"remark-parse": "^11.0.0",
6264
"remark-stringify": "^11.0.0",
@@ -76,5 +78,5 @@
7678
"after:bump": "npx changelogen@latest --no-commit --no-tag --output --r $(node -p \"require('./package.json').version\")"
7779
}
7880
},
79-
"packageManager": "pnpm@9.12.3"
81+
"packageManager": "pnpm@9.14.2"
8082
}

playground/assets/css/main.css

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
@import "tailwindcss";
2+
@import "@nuxt/ui";

playground/composables/useMarkdownGenerator.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,12 +5,12 @@ import type { Ref } from 'vue'
55
// workaround for kleur
66
process.env = process.env || {}
77

8-
function jsonParser (this: any) {
8+
function jsonParser(this: any) {
99
this.Parser = function (root: any) {
1010
return JSON.parse(root)
1111
}
1212
}
13-
export function useMarkdownGenerator (input: Ref<object>, mdcOptions = ref({})) {
13+
export function useMarkdownGenerator(input: Ref<object>, mdcOptions = ref({})) {
1414
let _stream: Processor<undefined, Node, Node, Root, string> | null = null
1515
const markdown = ref('')
1616
const generate = async (ast: object) => {
@@ -25,7 +25,7 @@ export function useMarkdownGenerator (input: Ref<object>, mdcOptions = ref({}))
2525
.use(gfm)
2626
.use(mdc, mdcOptions.value)
2727
.use(stringify, {
28-
bullet: '-'
28+
bullet: '-',
2929
})
3030
}
3131
const res = await _stream.process(JSON.stringify(ast)).then(file => file.value as string)

0 commit comments

Comments
 (0)