Skip to content

Commit 23191b5

Browse files
committed
fix: change package export methos
1 parent eebee32 commit 23191b5

File tree

7 files changed

+17
-7
lines changed

7 files changed

+17
-7
lines changed

.github/workflows/release.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ jobs:
1818
cache: 'yarn'
1919
- run: yarn install
2020
- run: yarn test:unit
21-
- run: yarn build-lib
21+
- run: yarn build:lib
2222
- name: Release
2323
env:
2424
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
"test": "vue-cli-service test",
1313
"test:unit": "vue-cli-service test:unit",
1414
"lint": "vue-cli-service lint",
15-
"build-lib": "vue-cli-service build --target lib --name hyone-ui ./src/export.js",
15+
"build:lib": "vue-cli-service build --target lib --name hyone-ui ./src/export.js",
1616
"build-storybook": "build-storybook",
1717
"build:storybook": "vue-cli-service storybook:build -c .storybook",
1818
"semantic-release": "semantic-release",

public/index.html

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,11 @@
66
<meta name="viewport" content="width=device-width,initial-scale=1.0">
77
<link rel="icon" href="<%= BASE_URL %>favicon.ico">
88
<title><%= htmlWebpackPlugin.options.title %></title>
9+
<link
10+
href="https://fonts.googleapis.com/css2?family=Red+Hat+Display:ital,wght@0,400;0,500;0,700;0,900;1,400;1,500;1,700;1,900&family=Red+Hat+Text:ital,wght@0,400;0,500;0,700;1,400;1,500;1,700&display=swap" rel="stylesheet"
11+
rel="stylesheet"
12+
>
13+
<script src="https://kit.fontawesome.com/0a0c5bfb2d.js" crossorigin="anonymous"></script>
914
</head>
1015
<body>
1116
<noscript>

src/App.vue

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
<template>
2-
<img alt="Vue logo" src="./assets/logo.png">
32
<a-button>Welcome</a-button>
43
</template>
54

src/assets/logo.png

-6.69 KB
Binary file not shown.

src/export.js

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,7 @@
1-
export * from './components';
2-
export * from './plugins';
1+
import * as Component from '@/components';
2+
import * as Plugin from '@/plugins';
3+
4+
export {
5+
Component,
6+
Plugin,
7+
};

src/main.js

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,8 @@
11
import { createApp } from 'vue';
22
import App from './App.vue';
3-
import { HyONEPlugin } from '@/plugins';
3+
import { Plugin } from '../dist/hyone-ui.umd';
4+
import '../dist/hyone-ui.css';
45

56
createApp(App)
6-
.use(HyONEPlugin)
7+
.use(Plugin.HyONEPlugin)
78
.mount('#app');

0 commit comments

Comments
 (0)