@md-plugins/vite-md-plugin 0.1.0-alpha.6 → 0.1.0-alpha.7
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +2 -2
- package/dist/index.d.mts +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.mjs +14 -11
- package/package.json +13 -13
package/README.md
CHANGED
|
@@ -67,7 +67,7 @@ If you’re using the Quasar Framework, additional configuration is needed to en
|
|
|
67
67
|
|
|
68
68
|
```js
|
|
69
69
|
import { viteMdPlugin } from '@md-plugins/vite-md-plugin';
|
|
70
|
-
import { menu } from './src/assets/menu'; // be sure to create this file
|
|
70
|
+
import { menu } from './src/.q-press/assets/menu'; // be sure to create this file
|
|
71
71
|
|
|
72
72
|
export default defineConfig((ctx) => {
|
|
73
73
|
// ...
|
|
@@ -82,7 +82,7 @@ build: {
|
|
|
82
82
|
},
|
|
83
83
|
|
|
84
84
|
vitePlugins: [
|
|
85
|
-
viteMdPlugin(ctx.appPaths.srcDir + '/
|
|
85
|
+
viteMdPlugin(ctx.appPaths.srcDir + '/markdown', menu),
|
|
86
86
|
// ...
|
|
87
87
|
],
|
|
88
88
|
},
|
package/dist/index.d.mts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Plugin } from '
|
|
1
|
+
import { Plugin } from 'vite';
|
|
2
2
|
|
|
3
3
|
interface MenuItem {
|
|
4
4
|
name: string;
|
package/dist/index.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Plugin } from '
|
|
1
|
+
import { Plugin } from 'vite';
|
|
2
2
|
|
|
3
3
|
interface MenuItem {
|
|
4
4
|
name: string;
|
package/dist/index.mjs
CHANGED
|
@@ -68,8 +68,8 @@ function createMarkdownRenderer(options = {}) {
|
|
|
68
68
|
containerComponent: "MarkdownPrerender",
|
|
69
69
|
copyButtonComponent: "MarkdownCopyButton",
|
|
70
70
|
pageScripts: [
|
|
71
|
-
"import MarkdownPrerender from 'components/
|
|
72
|
-
"import MarkdownCopyButton from 'components/
|
|
71
|
+
"import MarkdownPrerender from 'src/.q-press/components/MarkdownPrerender'",
|
|
72
|
+
"import MarkdownCopyButton from 'src/.q-press/components/MarkdownCopyButton.vue'"
|
|
73
73
|
]
|
|
74
74
|
});
|
|
75
75
|
md2.use(linkPlugin);
|
|
@@ -209,7 +209,7 @@ function getVueComponent(rendered, code, id, prefix, menu) {
|
|
|
209
209
|
}
|
|
210
210
|
const frontmatter = rendered?.frontmatter || {};
|
|
211
211
|
if (frontmatter.editLink !== false) {
|
|
212
|
-
frontmatter.editLink = id.substring(id.indexOf("src/
|
|
212
|
+
frontmatter.editLink = id.substring(id.indexOf("src/markdown/") + 10, id.length - 3);
|
|
213
213
|
}
|
|
214
214
|
const title = frontmatter.title || rendered.env.title || rendered.title || "Generic Page";
|
|
215
215
|
const desc = frontmatter.desc || false;
|
|
@@ -243,7 +243,7 @@ function getVueComponent(rendered, code, id, prefix, menu) {
|
|
|
243
243
|
${nav !== false ? ':nav="nav"' : ""}>${mdContent}</markdown-page>
|
|
244
244
|
</template>
|
|
245
245
|
<script setup>
|
|
246
|
-
import { copyHeading } from 'components/
|
|
246
|
+
import { copyHeading } from 'src/.q-press/components/markdown-utils'
|
|
247
247
|
${examples !== false ? `
|
|
248
248
|
import { provide } from 'vue'
|
|
249
249
|
provide('_markdown_examples_', process.env.CLIENT
|
|
@@ -269,24 +269,26 @@ function mdParse(code, id, prefix, menu) {
|
|
|
269
269
|
},
|
|
270
270
|
pageScripts: /* @__PURE__ */ new Set()
|
|
271
271
|
};
|
|
272
|
-
env.pageScripts.add("import MarkdownPage from 'src/layouts/
|
|
272
|
+
env.pageScripts.add("import MarkdownPage from 'src/.q-press/layouts/MarkdownPage.vue'");
|
|
273
273
|
if (markdownApiRE.test(code) === true) {
|
|
274
|
-
env.pageScripts.add("import MarkdownApi from 'components/
|
|
274
|
+
env.pageScripts.add("import MarkdownApi from 'src/.q-press/components/MarkdownApi.vue'");
|
|
275
275
|
}
|
|
276
276
|
if (markdownInstallationRE.test(code) === true) {
|
|
277
277
|
env.pageScripts.add(
|
|
278
|
-
"import MarkdownInstallation from 'components/
|
|
278
|
+
"import MarkdownInstallation from 'src/.q-press/components/MarkdownInstallation.vue'"
|
|
279
279
|
);
|
|
280
280
|
}
|
|
281
281
|
if (markdownTreeRE.test(code) === true) {
|
|
282
|
-
env.pageScripts.add("import MarkdownTree from 'components/
|
|
282
|
+
env.pageScripts.add("import MarkdownTree from 'src/.q-press/components/MarkdownTree.vue'");
|
|
283
283
|
}
|
|
284
284
|
const results = md.render(code, env);
|
|
285
285
|
if (env.frontmatter.examples !== void 0) {
|
|
286
|
-
env.pageScripts.add(
|
|
286
|
+
env.pageScripts.add(
|
|
287
|
+
"import MarkdownExample from 'src/.q-press/components/MarkdownExample.vue'"
|
|
288
|
+
);
|
|
287
289
|
}
|
|
288
290
|
if (markdownLinkRE.test(code) === true) {
|
|
289
|
-
env.pageScripts.add("import MarkdownLink from 'components/
|
|
291
|
+
env.pageScripts.add("import MarkdownLink from 'src/.q-press/components/MarkdownLink.vue'");
|
|
290
292
|
}
|
|
291
293
|
const component = getVueComponent(results, code, id, prefix, menu);
|
|
292
294
|
return {
|
|
@@ -324,7 +326,8 @@ function hotUpdate({
|
|
|
324
326
|
}
|
|
325
327
|
server.ws.send({
|
|
326
328
|
type: "full-reload",
|
|
327
|
-
path:
|
|
329
|
+
path: file
|
|
330
|
+
// '*',
|
|
328
331
|
});
|
|
329
332
|
}
|
|
330
333
|
return [];
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@md-plugins/vite-md-plugin",
|
|
3
|
-
"version": "0.1.0-alpha.
|
|
3
|
+
"version": "0.1.0-alpha.7",
|
|
4
4
|
"description": "A very opinionated Vite plugin for @md-plugins.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"markdown-it",
|
|
@@ -35,18 +35,18 @@
|
|
|
35
35
|
"./dist"
|
|
36
36
|
],
|
|
37
37
|
"dependencies": {
|
|
38
|
-
"@md-plugins/md-plugin-blockquote": "0.1.0-alpha.
|
|
39
|
-
"@md-plugins/md-plugin-
|
|
40
|
-
"@md-plugins/md-plugin-
|
|
41
|
-
"@md-plugins/md-plugin-
|
|
42
|
-
"@md-plugins/md-plugin-
|
|
43
|
-
"@md-plugins/md-plugin-image": "0.1.0-alpha.
|
|
44
|
-
"@md-plugins/md-plugin-imports": "0.1.0-alpha.
|
|
45
|
-
"@md-plugins/md-plugin-inlinecode": "0.1.0-alpha.
|
|
46
|
-
"@md-plugins/md-plugin-link": "0.1.0-alpha.
|
|
47
|
-
"@md-plugins/md-plugin-table": "0.1.0-alpha.
|
|
48
|
-
"@md-plugins/
|
|
49
|
-
"@md-plugins/
|
|
38
|
+
"@md-plugins/md-plugin-blockquote": "0.1.0-alpha.7",
|
|
39
|
+
"@md-plugins/md-plugin-containers": "0.1.0-alpha.7",
|
|
40
|
+
"@md-plugins/md-plugin-codeblocks": "0.1.0-alpha.7",
|
|
41
|
+
"@md-plugins/md-plugin-frontmatter": "0.1.0-alpha.7",
|
|
42
|
+
"@md-plugins/md-plugin-headers": "0.1.0-alpha.7",
|
|
43
|
+
"@md-plugins/md-plugin-image": "0.1.0-alpha.7",
|
|
44
|
+
"@md-plugins/md-plugin-imports": "0.1.0-alpha.7",
|
|
45
|
+
"@md-plugins/md-plugin-inlinecode": "0.1.0-alpha.7",
|
|
46
|
+
"@md-plugins/md-plugin-link": "0.1.0-alpha.7",
|
|
47
|
+
"@md-plugins/md-plugin-table": "0.1.0-alpha.7",
|
|
48
|
+
"@md-plugins/shared": "0.1.0-alpha.7",
|
|
49
|
+
"@md-plugins/md-plugin-title": "0.1.0-alpha.7"
|
|
50
50
|
},
|
|
51
51
|
"devDependencies": {
|
|
52
52
|
"@types/markdown-it": "^14.1.2",
|