@todovue/tv-ui 0.1.1 → 0.1.3

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 (2) hide show
  1. package/nuxt.js +13 -2
  2. package/package.json +4 -2
package/nuxt.js CHANGED
@@ -1,4 +1,3 @@
1
-
2
1
  import { defineNuxtModule } from '@nuxt/kit'
3
2
 
4
3
  export default defineNuxtModule({
@@ -6,7 +5,19 @@ export default defineNuxtModule({
6
5
  name: '@todovue/tv-ui',
7
6
  configKey: 'tvUi'
8
7
  },
9
- setup(_options, nuxt) {
8
+ async setup(_options, nuxt) {
9
+ const {createRequire} = await import('module');
10
+ const require = createRequire(import.meta.url);
11
+
12
+ nuxt.options.vite.resolve = nuxt.options.vite.resolve || {};
13
+ nuxt.options.vite.resolve.alias = nuxt.options.vite.resolve.alias || {};
14
+
15
+ Object.assign(nuxt.options.vite.resolve.alias, {
16
+ 'highlight.js': require.resolve('highlight.js').replace('index.js', 'common.js'),
17
+ 'markdown-it': require.resolve('markdown-it').replace('index.js', 'dist/markdown-it.min.js'),
18
+ 'vue3-markdown-it': require.resolve('vue3-markdown-it')
19
+ });
20
+
10
21
  const alertCss = '@todovue/tv-alert/style.css';
11
22
  const articleCss = '@todovue/tv-article/style.css';
12
23
  const breadcrumbsCss = '@todovue/tv-breadcrumbs/style.css';
package/package.json CHANGED
@@ -4,7 +4,7 @@
4
4
  "author": "Cristhian Daza",
5
5
  "description": "UI component library for TODOvue application",
6
6
  "license": "MIT",
7
- "version": "0.1.1",
7
+ "version": "0.1.3",
8
8
  "type": "module",
9
9
  "homepage": "https://ui.todovue.blog",
10
10
  "repository": {
@@ -55,7 +55,7 @@
55
55
  "scripts": {
56
56
  "dev": "node scripts/copy-assets.js && vite",
57
57
  "build": "vite build",
58
- "build:demo": "cp README.md public/ && cp CHANGELOG.md public/ && VITE_BUILD_TARGET=demo vite build"
58
+ "build:demo": "VITE_BUILD_TARGET=demo vite build"
59
59
  },
60
60
  "peerDependencies": {
61
61
  "vue": "^3.5.27"
@@ -87,6 +87,8 @@
87
87
  "@todovue/tv-sidebar": "^2.2.2",
88
88
  "@todovue/tv-theme-button": "^1.2.1",
89
89
  "@todovue/tv-toc": "^1.1.1",
90
+ "highlight.js": "^11.11.1",
91
+ "markdown-it": "^13.0.2",
90
92
  "vue-router": "^4.6.4"
91
93
  }
92
94
  }