Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update nuxt #118

Merged
merged 6 commits into from
May 22, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions components/ButtonStyled.vue
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,10 @@ withDefaults(
}
);

defineSlots<{
default: (props: {}) => any;
}>();

const className = cva("py-3 px-6 rounded-full flex gap-3 items-center", {
variants: {
intent: {
Expand Down
4 changes: 4 additions & 0 deletions components/ContentSection.vue
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,10 @@ withDefaults(
linkLabel: "See all",
}
);

defineSlots<{
default: (props: {}) => any;
}>();
</script>

<template>
Expand Down
2 changes: 1 addition & 1 deletion components/DropdownMenu.vue
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ defineProps<{
items: DropdownMenuItem[];
}>();

const emit = defineEmits(["close"]);
const emit = defineEmits<{ close: [] }>();

function close(event: Event) {
event.stopPropagation();
Expand Down
4 changes: 4 additions & 0 deletions components/PageHeading.vue
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,10 @@ const props = withDefaults(
}
);

defineSlots<{
default: (props: {}) => any;
}>();

const component = computed(() => `h${props.level}`);

const className = cva("font-bold leading-tight text-label-1", {
Expand Down
2 changes: 1 addition & 1 deletion components/album/SubAlbum.vue
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ const props = defineProps<{

const { data: album } = useAlbum({ id: props.id });

const emit = defineEmits(["expand"]);
const emit = defineEmits<{ expand: [] }>();

function expand() {
emit("expand");
Expand Down
4 changes: 4 additions & 0 deletions components/sidebar/SidebarGroup.vue
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,10 @@
defineProps<{
title?: string;
}>();

defineSlots<{
default: (props: {}) => any;
}>();
</script>

<template>
Expand Down
6 changes: 5 additions & 1 deletion components/track/TrackItem.vue
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,11 @@ defineProps<{
showThumbnail?: boolean;
}>();

const emit = defineEmits(["open-options", "play-track"]);
defineSlots<{
default: (props: {}) => any;
}>();

const emit = defineEmits<{ "open-options": []; "play-track": [] }>();

function openOptions(event: Event) {
event.stopPropagation();
Expand Down
4 changes: 4 additions & 0 deletions layouts/default.vue
Original file line number Diff line number Diff line change
@@ -1,6 +1,10 @@
<script lang="ts" setup>
import { MediaPlaylistInjectionKey } from "~/plugins/3.mediaPlayer";

defineSlots<{
default: (props: {}) => any;
}>();

const onError = (error: any) => {
console.error(error);
};
Expand Down
9 changes: 6 additions & 3 deletions nuxt.config.ts
Original file line number Diff line number Diff line change
@@ -1,17 +1,20 @@
// https://nuxt.com/docs/api/configuration/nuxt-config
// eslint-disable-next-line import/no-extraneous-dependencies
import { NuxtConfig } from "nuxt/config";
import vueI18n from "./i18n.config";

const modules: (string | any)[] = [
const modules: NuxtConfig["modules"] = [
["nuxt-typed-router", { strict: true }],
"@nuxt/devtools",
"./modules/figma2tailwind", // Must be placed before "@nuxtjs/tailwindcss"
// Use TS-path as workaround (See https://github.com/nuxt/nuxt/issues/20912)
"~/modules/figma2tailwind/index.ts", // Must be placed before "@nuxtjs/tailwindcss"
"@nuxtjs/tailwindcss",
"@nuxtjs/i18n",
"nuxt-vitest",
["@pinia/nuxt", { autoImports: ["defineStore"] }],
];

if (process.env.ELECTRON) modules.push(["nuxt-electron"]);
if (process.env.ELECTRON) modules.push("nuxt-electron");

export default defineNuxtConfig({
modules,
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@
"eslint-config-prettier": "^8.8.0",
"happy-dom": "^9.9.2",
"log-symbols": "^5.1.0",
"nuxt": "^3.4.1",
"nuxt": "^3.5.0",
"nuxt-electron": "^0.4.5",
"nuxt-typed-router": "^3.2.0",
"nuxt-vitest": "^0.7.0",
Expand Down
Loading