@md-plugins/vite-md-plugin 0.1.0-alpha.5 → 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 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 + '/pages', menu),
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 '/home/jeff/git/github/jeff/md-plugins/node_modules/.pnpm/vite@6.0.7_@types+node@22.10.5_jiti@2.4.2_sass-embedded@1.83.0_terser@5.37.0/node_modules/vite/dist/node/index.d.ts';
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 '/home/jeff/git/github/jeff/md-plugins/node_modules/.pnpm/vite@6.0.7_@types+node@22.10.5_jiti@2.4.2_sass-embedded@1.83.0_terser@5.37.0/node_modules/vite/dist/node/index.d.ts';
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/md/MarkdownPrerender'",
72
- "import MarkdownCopyButton from 'components/md/MarkdownCopyButton.vue'"
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/pages/") + 10, id.length - 3);
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/md/markdown-utils'
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/MarkdownPage.vue'");
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/md/MarkdownApi.vue'");
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/md/MarkdownInstallation.vue'"
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/md/MarkdownTree.vue'");
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("import MarkdownExample from 'components/md/MarkdownExample.vue'");
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/md/MarkdownLink.vue'");
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.5",
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.5",
39
- "@md-plugins/md-plugin-codeblocks": "0.1.0-alpha.5",
40
- "@md-plugins/md-plugin-frontmatter": "0.1.0-alpha.5",
41
- "@md-plugins/md-plugin-headers": "0.1.0-alpha.5",
42
- "@md-plugins/md-plugin-image": "0.1.0-alpha.5",
43
- "@md-plugins/md-plugin-containers": "0.1.0-alpha.5",
44
- "@md-plugins/md-plugin-inlinecode": "0.1.0-alpha.5",
45
- "@md-plugins/md-plugin-imports": "0.1.0-alpha.5",
46
- "@md-plugins/md-plugin-link": "0.1.0-alpha.5",
47
- "@md-plugins/md-plugin-table": "0.1.0-alpha.5",
48
- "@md-plugins/shared": "0.1.0-alpha.5",
49
- "@md-plugins/md-plugin-title": "0.1.0-alpha.5"
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",