Skip to content

Commit c79e908

Browse files
feat!: drop commonjs support
1 parent 68628b5 commit c79e908

25 files changed

+8129
-5908
lines changed

.eslintignore

Lines changed: 0 additions & 6 deletions
This file was deleted.

.eslintrc

Lines changed: 0 additions & 33 deletions
This file was deleted.

.nuxtrc

Lines changed: 0 additions & 1 deletion
This file was deleted.

.playground/app.config.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
export default defineAppConfig({
22
toaster: {
33
theme: {
4-
maxToasts: 10
5-
}
6-
}
4+
maxToasts: 10,
5+
},
6+
},
77
})

.playground/app.vue

Lines changed: 17 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -16,11 +16,11 @@ function showCustomToast() {
1616
$nt.show({
1717
content: () =>
1818
h(CustomToast, {
19-
message: `Hello ${i} from Nuxt module playground!`
19+
message: `Hello ${i} from Nuxt module playground!`,
2020
}),
2121
theme: {
2222
transition: {
23-
name: 'toaster'
23+
name: 'toaster',
2424
},
2525
maxToasts: 5,
2626
containerId: 'nt-container-bottom-right',
@@ -32,10 +32,10 @@ function showCustomToast() {
3232
'flex',
3333
'flex-col-reverse',
3434
'items-start',
35-
'gap-2'
35+
'gap-2',
3636
],
37-
wrapperClass: 'pointer-events-auto cursor-pointer'
38-
}
37+
wrapperClass: 'pointer-events-auto cursor-pointer',
38+
},
3939
})
4040
}
4141
@@ -44,7 +44,7 @@ async function showAdvancedToast() {
4444
const toast = await $nt.show({
4545
content: () =>
4646
h(AdvancedToast, {
47-
message: `Hello ${i} from Nuxt module playground!`
47+
message: `Hello ${i} from Nuxt module playground!`,
4848
}),
4949
dismissible: false,
5050
theme: {
@@ -58,7 +58,7 @@ async function showAdvancedToast() {
5858
'flex',
5959
'flex-col',
6060
'items-end',
61-
'gap-2'
61+
'gap-2',
6262
],
6363
wrapperClass: [
6464
'pointer-events-auto',
@@ -68,17 +68,17 @@ async function showAdvancedToast() {
6868
'focus:outline',
6969
'focus:outline-2',
7070
'focus-within:outline',
71-
'focus-within:outline-2'
71+
'focus-within:outline-2',
7272
],
7373
transition: {
7474
enterActiveClass: 'transition duration-300 ease-out',
7575
enterFromClass: 'transform translate-x-full opacity-0',
7676
enterToClass: 'transform translate-x-0 opacity-100',
7777
leaveActiveClass: 'transition duration-300 ease-in',
7878
leaveFromClass: 'transform translate-x-0 opacity-100',
79-
leaveToClass: 'transform translate-x-full opacity-0'
80-
}
81-
}
79+
leaveToClass: 'transform translate-x-full opacity-0',
80+
},
81+
},
8282
})
8383
8484
toast.el.focus()
@@ -88,12 +88,12 @@ function showGlobalToast() {
8888
$nt.showComponent('GlobalToast', {
8989
props: {
9090
type: 'basic',
91-
message: 'Hello from GlobalToast module playground!'
91+
message: 'Hello from GlobalToast module playground!',
9292
},
9393
options: {
9494
theme: {
9595
transition: {
96-
name: 'toaster'
96+
name: 'toaster',
9797
},
9898
maxToasts: 5,
9999
containerId: 'nt-container-bottom-right',
@@ -105,11 +105,11 @@ function showGlobalToast() {
105105
'flex',
106106
'flex-col-reverse',
107107
'items-start',
108-
'gap-2'
108+
'gap-2',
109109
],
110-
wrapperClass: 'pointer-events-auto cursor-pointer'
111-
}
112-
}
110+
wrapperClass: 'pointer-events-auto cursor-pointer',
111+
},
112+
},
113113
})
114114
}
115115
function clearAllToast() {

.playground/components/AdvancedToast.vue

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,9 +15,9 @@ const { percent, closeIn, endAt } = useNinjaToasterProgress()
1515
<div
1616
class="h-4 rounded-b bg-slate-600"
1717
:style="{
18-
width: `${percent * 100}%`
18+
width: `${percent * 100}%`,
1919
}"
20-
></div>
20+
/>
2121
</div>
2222

2323
<button

.playground/nuxt.config.ts

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -7,9 +7,9 @@ export default defineNuxtConfig({
77
head: {
88
script: [
99
{
10-
src: 'https://cdn.tailwindcss.com'
11-
}
12-
]
13-
}
14-
}
10+
src: 'https://cdn.tailwindcss.com',
11+
},
12+
],
13+
},
14+
},
1515
})

.playground/package.json

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,13 @@
11
{
22
"private": true,
3-
"name": "my-module-playground"
3+
"name": "my-module-playground",
4+
"type": "module",
5+
"scripts": {
6+
"dev": "nuxi dev",
7+
"build": "nuxi build",
8+
"generate": "nuxi generate"
9+
},
10+
"dependencies": {
11+
"nuxt": "^4.0.0"
12+
}
413
}

.playground/tsconfig.json

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
{
2+
"extends": "./.nuxt/tsconfig.json"
3+
}

.prettierrc

Lines changed: 0 additions & 6 deletions
This file was deleted.

0 commit comments

Comments
 (0)