@yunlefun/vue 0.0.3 → 0.0.4
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/nuxt.js +1 -0
- package/package.json +6 -1
- package/build.config.ts +0 -17
- package/index.md +0 -35
- package/src/README.md +0 -3
- package/src/app.config.ts +0 -1
- package/src/index.ts +0 -13
- package/src/module.ts +0 -1
- package/src/types.ts +0 -1
- package/tsconfig.json +0 -6
package/nuxt.js
CHANGED
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@yunlefun/vue",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "0.0.
|
|
4
|
+
"version": "0.0.4",
|
|
5
5
|
"description": "Components for YunLeFun",
|
|
6
6
|
"exports": {
|
|
7
7
|
"./components/*": "./components/*",
|
|
@@ -16,6 +16,11 @@
|
|
|
16
16
|
"main": "./dist/index.cjs",
|
|
17
17
|
"module": "./dist/index.mjs",
|
|
18
18
|
"types": "./dist/index.d.ts",
|
|
19
|
+
"files": [
|
|
20
|
+
"components",
|
|
21
|
+
"dist",
|
|
22
|
+
"nuxt.js"
|
|
23
|
+
],
|
|
19
24
|
"scripts": {
|
|
20
25
|
"build": "unbuild",
|
|
21
26
|
"prepublishOnly": "npm run build",
|
package/build.config.ts
DELETED
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
import { defineBuildConfig } from 'unbuild'
|
|
2
|
-
|
|
3
|
-
export default defineBuildConfig({
|
|
4
|
-
entries: [
|
|
5
|
-
'./src/index',
|
|
6
|
-
],
|
|
7
|
-
|
|
8
|
-
declaration: true,
|
|
9
|
-
clean: true,
|
|
10
|
-
rollup: {
|
|
11
|
-
emitCJS: true,
|
|
12
|
-
},
|
|
13
|
-
externals: [
|
|
14
|
-
'unplugin-vue-components',
|
|
15
|
-
'@nuxt/kit',
|
|
16
|
-
],
|
|
17
|
-
})
|
package/index.md
DELETED
|
@@ -1,35 +0,0 @@
|
|
|
1
|
-
# Components
|
|
2
|
-
|
|
3
|
-
## Usage
|
|
4
|
-
|
|
5
|
-
```bash
|
|
6
|
-
pnpm add -D @yunlefun/vue-components
|
|
7
|
-
```
|
|
8
|
-
|
|
9
|
-
### Add auto import resolver for vue components
|
|
10
|
-
|
|
11
|
-
```ts
|
|
12
|
-
// vite.config.ts
|
|
13
|
-
import { defineConfig } from 'vite'
|
|
14
|
-
import { YlfResolver } from '@yunlefun/vue-components/auto-import-resolver'
|
|
15
|
-
import Components from 'unplugin-vue-components/vite'
|
|
16
|
-
|
|
17
|
-
export default defineConfig({
|
|
18
|
-
plugins: [
|
|
19
|
-
// https://github.com/antfu/unplugin-vue-components
|
|
20
|
-
Components({
|
|
21
|
-
// allow auto load markdown components under `./src/components/`
|
|
22
|
-
extensions: ['vue', 'md'],
|
|
23
|
-
// allow auto import and register components used in markdown
|
|
24
|
-
include: [/\.vue$/, /\.vue\?vue/, /\.md$/],
|
|
25
|
-
dts: 'src/components.d.ts',
|
|
26
|
-
resolvers: [
|
|
27
|
-
// add @yunlefun/vue-components auto import resolver
|
|
28
|
-
YlfResolver(),
|
|
29
|
-
],
|
|
30
|
-
}),
|
|
31
|
-
]
|
|
32
|
-
})
|
|
33
|
-
```
|
|
34
|
-
|
|
35
|
-
You can use `<YlfXxx />` components in your vue files directly.
|
package/src/README.md
DELETED
package/src/app.config.ts
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export default {}
|
package/src/index.ts
DELETED
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
import { dirname, resolve } from 'node:path'
|
|
2
|
-
|
|
3
|
-
import { fileURLToPath } from 'node:url'
|
|
4
|
-
|
|
5
|
-
// other exports
|
|
6
|
-
export * from './types'
|
|
7
|
-
|
|
8
|
-
// shim
|
|
9
|
-
export const _dirname = typeof __dirname !== 'undefined'
|
|
10
|
-
? __dirname
|
|
11
|
-
: dirname(fileURLToPath(import.meta.url))
|
|
12
|
-
|
|
13
|
-
export const componentsDir = resolve(_dirname, '../components')
|
package/src/module.ts
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
type DeepPartial<T> = Partial<{ [P in keyof T]: DeepPartial<T[P]> | { [key: string]: string } }>
|
package/src/types.ts
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export * from '../components/bottom-menu'
|