Skip to content

Commit

Permalink
chore(demo): Upgrade dependencies
Browse files Browse the repository at this point in the history
  • Loading branch information
becem-gharbi committed Jul 27, 2023
1 parent 7dfae31 commit 77b5f09
Show file tree
Hide file tree
Showing 8 changed files with 430 additions and 576 deletions.
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -54,3 +54,5 @@ coverage
Network Trash Folder
Temporary Items
.apdisk

package
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ A Nuxt 3 module for integrating the official Directus [JS SDK](https://github.co

**IMPORTANT**

_This version `2` is based on the new Directus SDK. The version based on the old Directus SDK is `v1`._
_This version `2` is based on the new Directus SDK. The version based on the old Directus SDK is `v1` under `version-1` branch._

- ✔️ Typescript first
- ✔️ Lightweight & dependency free
Expand All @@ -23,7 +23,7 @@ _This version `2` is based on the new Directus SDK. The version based on the old
- [x] Provide `$directus` helper to expose Directus client.
- [x] Add authentication composable & page middlewares.
- [x] Handle universal refresh of access token with cookie storage.
- [ ] Add `graphql` composable.
- [ ] Add `graphql` composable.
- [ ] Add `realtime` composable.
- [ ] Consider auto import of `@directus/sdk` APIs.
- [ ] Consider the usage of `$fetch` over `fetch` for transport.
Expand Down
6 changes: 6 additions & 0 deletions demo/app.vue
Original file line number Diff line number Diff line change
@@ -1,13 +1,19 @@
<template>
<NaiveConfig :theme-config="themeConfig">
<n-message-provider>

<NaiveColorModeSwitch />

<p>{{ dependencies["@bg-dev/nuxt-directus"] }}</p>

<NuxtPage />

</n-message-provider>
</NaiveConfig>
</template>

<script setup lang="ts">
import { dependencies } from "./package.json"
import { ThemeConfig } from "@bg-dev/nuxt-naiveui"
const themeConfig: ThemeConfig = {
Expand Down
5 changes: 0 additions & 5 deletions demo/nuxt.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -26,12 +26,7 @@ export default defineNuxtConfig({
baseUrl: process.env.NUXT_DIRECTUS_BASE_URL || "http://127.0.0.1:8055", // Directus app base url
nuxtBaseUrl: process.env.NUXT_BASE_URL || "http://127.0.0.1:3000", // Nuxt app base url
auth: {
enabled: true,
enableGlobalAuthMiddleware: false, // Enable auth middleware on every page
refreshTokenCookieName: "directus_refresh_token",
defaultRoleId:
process.env.NUXT_DIRECTUS_DEFAULT_ROLE_ID ||
"271daf4d-db38-477d-bdd1-412117e1a5c0", // Role id assigned for new registered users
redirect: {
login: "/auth/login", // Path to redirect when login is required
logout: "/auth/login", // Path to redirect after logout
Expand Down
7 changes: 3 additions & 4 deletions demo/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,12 +8,11 @@
"postinstall": "nuxt prepare"
},
"devDependencies": {
"@bg-dev/nuxt-naiveui": "^1.2.1",
"@bg-dev/nuxt-naiveui": "^1.2.2",
"@nuxtjs/tailwindcss": "^6.8.0",
"nuxt": "3.6.3"
"nuxt": "3.6.5"
},
"dependencies": {
"@bg-dev/nuxt-directus": "link:..\\package",
"@directus/sdk": "^11.0.0"
"@bg-dev/nuxt-directus": "2.0.1-beta"
}
}
1 change: 0 additions & 1 deletion demo/pages/home.vue
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
<NuxtLayout>
<UserCard></UserCard>
<hr>
{{ books }}
</NuxtLayout>
</template>

Expand Down
Loading

1 comment on commit 77b5f09

@vercel
Copy link

@vercel vercel bot commented on 77b5f09 Jul 27, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.