Skip to content

Commit 0475599

Browse files
committed
Fix: build bugs
1 parent 613a415 commit 0475599

File tree

6 files changed

+139
-34
lines changed

6 files changed

+139
-34
lines changed

build.config.ts

Lines changed: 10 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,10 @@
1-
import { defineBuildConfig } from 'unbuild'
2-
import vue from '@vitejs/plugin-vue'
1+
import { defineBuildConfig } from 'unbuild';
2+
import vue from '@vitejs/plugin-vue';
33

4-
export default defineBuildConfig({
5-
entries: [
4+
export default defineBuildConfig(
5+
{
6+
entries:
7+
[
68
{
79
input: 'src/index',
810
name: 'index',
@@ -18,9 +20,11 @@ export default defineBuildConfig({
1820
],
1921
declaration: true,
2022
clean: true,
21-
rollup: {
23+
rollup:
24+
{
2225
emitCJS: true,
23-
dts: {
26+
dts:
27+
{
2428
respectExternal: true,
2529
},
2630
external: ['vue'],

package-lock.json

Lines changed: 95 additions & 4 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "vue-persian-calendar-datepicker",
3-
"version": "1.0.9",
3+
"version": "1.1.3",
44
"description": "A Vue 3 Persian calendar and datepicker with official Iranian holidays, Jalali, Hijri, and Gregorian date support.",
55
"author": "Mohammad Hossein Pour",
66
"license": "MIT",
@@ -51,18 +51,19 @@
5151
],
5252
"scripts": {
5353
"build": "vite build",
54-
"dev": "vite build --watch",
55-
"prepack": "npm run build",
56-
"prepublishOnly": "npm run build"
54+
"dev": "vite build --watch"
5755
},
5856
"peerDependencies": {
5957
"vue": "^3.3.0"
6058
},
6159
"devDependencies": {
6260
"@vitejs/plugin-vue": "^6.0.1",
63-
"typescript": "^5.6.3",
61+
"@vue/compiler-sfc": "^3.5.22",
62+
"rollup-plugin-vue": "^6.0.0",
63+
"typescript": "^5.9.3",
6464
"vite": "^7.1.12",
6565
"vite-plugin-dts": "^4.5.4",
66-
"vue": "^3.3.0"
66+
"vue": "^3.3.0",
67+
"vue-tsc": "^3.1.1"
6768
}
6869
}

src/components/PersianCalendar.vue

Lines changed: 16 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -607,13 +607,19 @@ onMounted(() =>
607607
</div>
608608
</slot>
609609
610-
<slot
611-
name="hijri-events"
612-
:events="currentEvents.hijriEvents"
610+
<slot name="hijri-events"
611+
:events="currentEvents.hijriEvents"
613612
>
614-
<div v-if="currentEvents.hijriEvents.length" class="event-group">
615-
<span v-for="(event, i) in currentEvents.hijriEvents" :key="i">
616-
<slot name="hijri-event" :event="event" :index="i">
613+
<div v-if="currentEvents.hijriEvents.length"
614+
class="event-group"
615+
>
616+
<span v-for="(event, i) in currentEvents.hijriEvents"
617+
:key="i"
618+
>
619+
<slot name="hijri-event"
620+
:event="event"
621+
:index="i"
622+
>
617623
{{ event }}
618624
</slot>
619625
</span>
@@ -622,7 +628,10 @@ onMounted(() =>
622628
</div>
623629
</slot>
624630
625-
<slot name="footer" :selectedDay="selectedDay" :currentEvents="currentEvents"></slot>
631+
<slot name="footer"
632+
:selectedDay="selectedDay"
633+
:currentEvents="currentEvents"
634+
></slot>
626635
</div>
627636
628637
</template>

src/index.ts

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,10 @@ import PersianDatePicker from "./components/PersianDatePicker.vue";
44
import { usePersianCalendar } from "./composables/usePersianCalendar";
55

66
// Vue plugin
7-
export default {
8-
install(app: App) {
7+
export default
8+
{
9+
install(app: App)
10+
{
911
app.component("PersianCalendar", PersianCalendar);
1012
app.component("PersianDatePicker", PersianDatePicker);
1113
},

tsconfig.json

Lines changed: 7 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,15 @@
11
{
2-
"compilerOptions":
3-
{
2+
"compilerOptions": {
43
"target": "ESNext",
54
"module": "ESNext",
6-
"moduleResolution": "node",
5+
"moduleResolution": "Node",
76
"declaration": true,
7+
"declarationDir": "dist/types",
88
"outDir": "dist",
99
"strict": true,
1010
"esModuleInterop": true,
11-
"skipLibCheck": true
11+
"skipLibCheck": true,
12+
"allowJs": true
1213
},
13-
14-
"include": [
15-
"src"
16-
]
17-
}
14+
"include": ["src"]
15+
}

0 commit comments

Comments
 (0)