Skip to content
This repository was archived by the owner on Jan 1, 2025. It is now read-only.

Commit eb9255d

Browse files
authored
Refactor build, create auto types system, change component file type (#13)
* Refactor build, add cdn support, auto create types * Update package.json * Update App.vue
1 parent 31f999c commit eb9255d

13 files changed

+454
-286
lines changed

CHANGELOG.md

+22
Original file line numberDiff line numberDiff line change
@@ -1,23 +1,45 @@
1+
## 0.2.0
2+
3+
- Types updated.
4+
- Added support for cdn (unpkg, jsdelivr)
5+
- Browser global name changed from `window['simplebar-vue3']` to `window.SimpleBarVue3`
6+
7+
#### Breaking Changes
8+
9+
- Instead of giving a prop for each SimpleBar option, now there is `options` prop which expects SimpleBar options.
10+
11+
<br>
12+
113
## 0.1.6, 0.1.7, 0.1.8
214

315
- Just build fixes
416

17+
<br>
18+
519
## 0.1.5
620

721
- Bundle production code as `es2020`
822

23+
<br>
24+
925
## 0.1.4
1026

1127
- Fix typings
1228

29+
<br>
30+
1331
## 0.1.3
1432

1533
- Add `tag` prop support.
1634

35+
<br>
36+
1737
## 0.1.1 / 0.1.2
1838

1939
- Fixed typings.
2040

41+
<br>
42+
2143
## 0.1.0
2244

2345
- Added template ref supoprt.

README.md

+6-14
Original file line numberDiff line numberDiff line change
@@ -128,25 +128,17 @@ In **CHILD COMPONENTS** you can use `useSimplebar` composable to access simpleba
128128
</script>
129129
```
130130

131-
### Options
132-
133-
You can give these options to the component as props.
131+
### Props
134132

135133
```ts
136134
import { Options } from 'simplebar';
137135

138136
interface SimpleBarProps {
139-
tag?: string; //default 'div'
140-
141-
// Simplebar Options as prop
142-
autoHide?: Options['autoHide'];
143-
classNames?: Options['classNames'];
144-
clickOnTrack?: Options['clickOnTrack'];
145-
direction?: Options['direction'];
146-
forceVisible?: Options['forceVisible'];
147-
scrollbarMaxSize?: Options['scrollbarMaxSize'];
148-
scrollbarMinSize?: Options['scrollbarMinSize'];
149-
timeout?: Options['timeout'];
137+
/**
138+
* @default {'div'}
139+
*/
140+
tag?: string;
141+
options?: Options;
150142
}
151143
```
152144

package.json

+7-9
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,11 @@
11
{
22
"name": "simplebar-vue3",
3-
"version": "0.1.8",
3+
"version": "0.2.0",
44
"main": "./dist/simplebar-vue3.umd.js",
55
"module": "./dist/simplebar-vue3.mjs",
6-
"types": "./dist/lib.d.ts",
6+
"types": "./dist/types/lib.d.ts",
7+
"unpkg": "dist/simplebar-vue3.iife.js",
8+
"jsdelivr": "dist/simplebar-vue3.iife.js",
79
"exports": {
810
".": {
911
"require": "./dist/simplebar-vue3.umd.js",
@@ -25,23 +27,19 @@
2527
"license": "MIT",
2628
"scripts": {
2729
"dev": "vite",
28-
"build": "vue-tsc --noEmit && vite build"
30+
"build": "vite build"
2931
},
3032
"devDependencies": {
31-
"@types/fs-extra": "^9.0.13",
3233
"@types/node": "^16.11.54",
3334
"@types/prompts": "^2.0.14",
3435
"@vitejs/plugin-vue": "^3.0.3",
3536
"@vue/compiler-sfc": "^3.2.37",
36-
"chalk": "^4.1.2",
37-
"execa": "^5.1.1",
38-
"fast-glob": "^3.2.11",
39-
"fs-extra": "^10.1.0",
40-
"prompts": "^2.4.2",
4137
"simplebar": "5.3.8",
38+
"simplebar-vue3": "file:./",
4239
"ts-node": "^10.9.1",
4340
"typescript": "~4.7.4",
4441
"vite": "^3.0.9",
42+
"vite-plugin-dts": "^1.4.1",
4543
"vue": "^3.2.37",
4644
"vue-tsc": "^0.38.9"
4745
},

0 commit comments

Comments
 (0)