@md-plugins/quasar-app-extension-vite-md-plugin 0.1.0-alpha.9 → 0.1.0-beta.1

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.
Files changed (3) hide show
  1. package/README.md +15 -4
  2. package/package.json +18 -16
  3. package/src/index.js +6 -5
package/README.md CHANGED
@@ -17,12 +17,16 @@ The `viteMdPluginAppExt` extension provides a convenient way to use Markdown fil
17
17
 
18
18
  This App-Extension (app-ext) is for convenience only. For more granular control, you can use the `viteMdPlugin` directly in your Vite configuration. For more information, refer to the [viteMdPlugin documentation](https://github.com/md-plugins/md-plugins/tree/dev/packages/viteMdPlugin).
19
19
 
20
+ > Current beta release: `0.1.0-beta.1`.
21
+ >
22
+ > This app extension currently targets Quasar Vite projects using `@quasar/app-vite` `>=3.0.0-beta.14`.
23
+
20
24
  ## Installation
21
25
 
22
26
  To install the `viteMdPluginAppExt` extension, use the following command:
23
27
 
24
28
  ```bash
25
- pnpm add @md-plugins/vite-md-plugin-app-ext
29
+ quasar ext add @md-plugins/vite-md-plugin
26
30
  ```
27
31
 
28
32
  ## What It Does
@@ -48,9 +52,9 @@ framework: {
48
52
 
49
53
  After installing the extension, you need to configure it in your Quasar project. Here are the steps to get started:
50
54
 
51
- 1. **Import `@md-plugins/vite-md-plugin`:**
55
+ 1. **Import `viteMdPlugin`:**
52
56
 
53
- Update your `quasar.config.js` or `quasar.config.ts` to include the `@md-plugins/vite-md-plugin` extension:
57
+ Update your `quasar.config.js` or `quasar.config.ts` to include the `@md-plugins/vite-md-plugin` package:
54
58
 
55
59
  ```js
56
60
  import { viteMdPlugin, type MenuItem } from '@md-plugins/vite-md-plugin'
@@ -67,7 +71,10 @@ const { sidebar } = siteConfig
67
71
 
68
72
  ```js
69
73
  vitePlugins: [
70
- viteMdPlugin(ctx.appPaths.srcDir + '/markdown', sidebar as MenuItem[]),
74
+ viteMdPlugin({
75
+ path: ctx.appPaths.srcDir + '/markdown',
76
+ menu: sidebar as MenuItem[],
77
+ }),
71
78
  // ...
72
79
  ```
73
80
 
@@ -79,6 +86,10 @@ The `viteMdPluginAppExt` extension can be customized through various options. He
79
86
  - **`viteVuePluginOptions.include`**: Include Markdown files for Vite to transpile.
80
87
  - **`framework.autoImportVueExtensions`**: Enable auto-import for Markdown extensions.
81
88
 
89
+ ## Documentation
90
+
91
+ In case this README falls out of date, please refer to the [documentation](https://md-plugins.netlify.app/quasar-app-extensions/vite-md-plugin-app-ext/overview) for the latest information.
92
+
82
93
  ## License
83
94
 
84
95
  This project is licensed under the MIT License. See the [LICENSE](LICENSE.md) file for details.
package/package.json CHANGED
@@ -1,29 +1,31 @@
1
1
  {
2
2
  "name": "@md-plugins/quasar-app-extension-vite-md-plugin",
3
- "version": "0.1.0-alpha.9",
3
+ "version": "0.1.0-beta.1",
4
4
  "description": "A Quasar app-ext for @md-plugins/viteMdPlugin",
5
- "author": "Jeff <galbraith64@gmail.com>",
6
- "license": "MIT",
7
- "type": "module",
8
- "engines": {
9
- "node": ">= 20",
10
- "npm": ">= 5.6.0",
11
- "yarn": ">= 1.6.0"
12
- },
13
- "publishConfig": {
14
- "access": "public"
15
- },
16
5
  "keywords": [
17
- "quasar",
18
- "app",
19
6
  "app extension",
20
7
  "extension",
21
8
  "markdown",
22
9
  "md-plugins",
10
+ "quasar",
23
11
  "viteMdPlugin"
24
12
  ],
25
- "dependencies": {
26
- "@md-plugins/vite-md-plugin": "0.1.0-alpha.9"
13
+ "license": "MIT",
14
+ "author": "Jeff <galbraith64@gmail.com>",
15
+ "type": "module",
16
+ "publishConfig": {
17
+ "access": "public"
18
+ },
19
+ "devDependencies": {
20
+ "@quasar/app-vite": "3.0.0-beta.14",
21
+ "@md-plugins/vite-md-plugin": "0.1.0-beta.1"
22
+ },
23
+ "peerDependencies": {
24
+ "@quasar/app-vite": ">=3.0.0-beta.14"
25
+ },
26
+ "engines": {
27
+ "node": ">=22.13",
28
+ "pnpm": ">=11.1.0"
27
29
  },
28
30
  "scripts": {
29
31
  "test": "echo \"No test specified\" && exit 0"
package/src/index.js CHANGED
@@ -1,4 +1,3 @@
1
- /*global console*/
2
1
  /**
3
2
  * Quasar App Extension index/runner script
4
3
  * (runs on each dev/build)
@@ -6,10 +5,12 @@
6
5
  * Docs: https://quasar.dev/app-extensions/development-guide/index-api
7
6
  */
8
7
 
8
+ import { defineIndexScript } from '@quasar/app-vite'
9
+
9
10
  function extendConfig(config) {
10
11
  // make sure 'vueRouterMode' has 'history' mode
11
12
  if (config.build.vueRouterMode !== 'history') {
12
- console.log('Changing vueRouterMode to "history" - required for hash links to work correctly')
13
+ console.warn('Changing vueRouterMode to "history" - required for hash links to work correctly')
13
14
  config.build.vueRouterMode = 'history'
14
15
  }
15
16
 
@@ -24,15 +25,15 @@ function extendConfig(config) {
24
25
  config.framework.autoImportVueExtensions = Array.from(extensions)
25
26
  }
26
27
 
27
- export default function (api) {
28
+ export default defineIndexScript((api) => {
28
29
  // verify this is a Vite project
29
30
  if (!api.hasVite) {
30
31
  throw new Error('This extension requires Vite')
31
32
  }
32
33
 
33
34
  api.compatibleWith('quasar', '^2.0.0')
34
- api.compatibleWith('@quasar/app-vite', '^2.0.0')
35
+ api.compatibleWith('@quasar/app-vite', '>=3.0.0-beta.14')
35
36
 
36
37
  // here we extend /quasar.config, so we can add some Vite/Vue stuff
37
38
  api.extendQuasarConf(extendConfig)
38
- }
39
+ })