Skip to content

Commit e30b2b3

Browse files
committed
Refactor code structure for improved readability and maintainability
1 parent d3c622b commit e30b2b3

22 files changed

+66
-500
lines changed

.github/workflows/publish-packages.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,7 @@ jobs:
3535
node-version: '20'
3636
registry-url: 'https://npm.pkg.github.com'
3737
scope: '@devbyrayray'
38+
cache: 'pnpm'
3839

3940
- name: Setup PNPM
4041
uses: pnpm/action-setup@v3

README.md

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -17,12 +17,12 @@ You can install individual components or the entire library:
1717

1818
```bash
1919
# Install the entire library
20-
npm install @vue-web-component-library/components
20+
npm install @devbyrayray/vue-wc-components
2121

2222
# Or install individual components
23-
npm install @vue-web-component-library/button
24-
npm install @vue-web-component-library/input
25-
npm install @vue-web-component-library/icon
23+
npm install @devbyrayray/vue-wc-button
24+
npm install @devbyrayray/vue-wc-input
25+
npm install @devbyrayray/vue-wc-icon
2626
```
2727

2828
### Installing from GitHub Packages
@@ -32,7 +32,7 @@ The packages are also available on GitHub Packages. To use them:
3232
1. Create or modify your `.npmrc` file in your project root:
3333

3434
```
35-
@vue-web-component-library:registry=https://npm.pkg.github.com
35+
@devbyrayray:registry=https://npm.pkg.github.com
3636
//npm.pkg.github.com/:_authToken=${GITHUB_TOKEN}
3737
```
3838

@@ -46,12 +46,12 @@ export GITHUB_TOKEN=your_github_token
4646

4747
```bash
4848
# Install the entire library
49-
npm install @vue-web-component-library/components
49+
npm install @devbyrayray/vue-wc-components
5050

5151
# Or install individual components
52-
npm install @vue-web-component-library/button
53-
npm install @vue-web-component-library/input
54-
npm install @vue-web-component-library/icon
52+
npm install @devbyrayray/vue-wc-button
53+
npm install @devbyrayray/vue-wc-input
54+
npm install @devbyrayray/vue-wc-icon
5555
```
5656

5757
## Usage
@@ -62,12 +62,12 @@ You can import each component individually:
6262

6363
```js
6464
// Import specific components
65-
import '@vue-web-component-library/button';
66-
import '@vue-web-component-library/input';
67-
import '@vue-web-component-library/icon';
65+
import '@devbyrayray/vue-wc-button';
66+
import '@devbyrayray/vue-wc-input';
67+
import '@devbyrayray/vue-wc-icon';
6868

6969
// Or import everything
70-
import '@vue-web-component-library/components';
70+
import '@devbyrayray/vue-wc-components';
7171
```
7272

7373
### Using in HTML

package.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,7 @@
3636
"vue": "^3.5.13"
3737
},
3838
"dependencies": {
39-
"jsdom": "^26.0.0"
39+
"@devbyrayray/vue-wc-core": "workspace:*",
40+
"@devbyrayray/vue-wc-vite": "workspace:*"
4041
}
4142
}

packages/components/button/package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -33,8 +33,8 @@
3333
"registry": "https://npm.pkg.github.com"
3434
},
3535
"dependencies": {
36-
"@vue-web-component-library/core": "workspace:*",
37-
"@vue-web-component-library/vite": "workspace:*",
36+
"@devbyrayray/vue-wc-core": "workspace:*",
37+
"@devbyrayray/vue-wc-vite": "workspace:*",
3838
"vue": "^3.5.0"
3939
},
4040
"devDependencies": {

packages/components/button/src/Button.ce.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515

1616
<script setup lang="ts">
1717
import { defineProps, defineEmits } from 'vue';
18-
import { BaseProps, Size, Variant } from '@vue-web-component-library/core';
18+
import { BaseProps, Size, Variant } from '@devbyrayray/vue-wc-core';
1919
2020
export interface ButtonProps extends /* @vue-ignore */ BaseProps {
2121
/**

packages/components/button/src/index.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import { defineCustomElement as VueDefineCustomElement } from 'vue';
22
import ButtonComponent from './Button.ce.vue';
3-
import { defineCustomElement, COMPONENT_NAMES } from '@vue-web-component-library/core';
3+
import { defineCustomElement, COMPONENT_NAMES } from '@devbyrayray/vue-wc-core';
44

55
// Define the Button as a Vue custom element
66
const ButtonElement = VueDefineCustomElement(ButtonComponent);

packages/components/button/vite.config.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { defineBaseConfig } from '@vue-web-component-library/vite';
1+
import { defineBaseConfig } from '@devbyrayray/vue-wc-vite';
22

33
export default defineBaseConfig({
44
name: 'vwcButton',

packages/components/icon/package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -34,8 +34,8 @@
3434
"registry": "https://npm.pkg.github.com"
3535
},
3636
"dependencies": {
37-
"@vue-web-component-library/core": "workspace:*",
38-
"@vue-web-component-library/vite": "workspace:*",
37+
"@devbyrayray/vue-wc-core": "workspace:*",
38+
"@devbyrayray/vue-wc-vite": "workspace:*",
3939
"vue": "^3.5.0"
4040
}
4141
}

packages/components/icon/src/Icon.ce.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313

1414
<script setup lang="ts">
1515
import { defineProps, computed } from 'vue';
16-
import { BaseProps, Size } from '@vue-web-component-library/core';
16+
import { BaseProps, Size } from '@devbyrayray/vue-wc-core';
1717
1818
export interface IconProps extends /* @vue-ignore */ BaseProps {
1919
/**

packages/components/icon/src/index.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import { defineCustomElement as VueDefineCustomElement } from 'vue';
22
import IconComponent from './Icon.ce.vue';
3-
import { defineCustomElement, COMPONENT_NAMES } from '@vue-web-component-library/core';
3+
import { defineCustomElement, COMPONENT_NAMES } from '@devbyrayray/vue-wc-core';
44

55
// Define the Icon as a Vue custom element
66
const IconElement = VueDefineCustomElement(IconComponent);

0 commit comments

Comments
 (0)