Skip to content

Commit

Permalink
feat: integrate @nuxt/ui
Browse files Browse the repository at this point in the history
Close #3
  • Loading branch information
yuler committed Sep 25, 2023
1 parent c2af69d commit 121568d
Show file tree
Hide file tree
Showing 11 changed files with 1,389 additions and 47 deletions.
5 changes: 5 additions & 0 deletions .vscode/extensions.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
{
"recommendations": [
"bradlc.vscode-tailwindcss"
]
}
22 changes: 20 additions & 2 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@

// Auto fix
"editor.codeActionsOnSave": {
"source.fixAll.eslint": "always",
"source.organizeImports": "never"
"source.fixAll.eslint": true,
"source.organizeImports": true
},

// Silent the stylistic rules in you IDE, but still auto fix them
Expand Down Expand Up @@ -41,5 +41,23 @@
"json",
"jsonc",
"yaml"
],

// refs: https://ui.nuxt.com/getting-started/installation#intellisense
"files.associations": {
"*.css": "tailwindcss"
},
"editor.quickSuggestions": {
"strings": true
},
"tailwindCSS.experimental.configFile": "tailwind.config.ts",
"tailwindCSS.experimental.classRegex": [
["ui:\\s*{([^)]*)\\s*}", "[\"'`]([^\"'`]*).*?[\"'`]"],
["/\\*ui\\*/\\s*{([^;]*)}", ":\\s*[\"'`]([^\"'`]*).*?[\"'`]"]
],
"tailwindCSS.classAttributes": [
"class",
"className",
"ui"
]
}
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@

- [nuxt3](https://nuxt.com/)
- [prisma](https://prisma.io/)
- [unocss](https://unocss.dev/)
- [NuxtUI](https://ui.nuxt.com/)
- [trpc](https://trpc.io/)

## Development Setup
Expand Down
6 changes: 6 additions & 0 deletions app.config.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
export default defineAppConfig({
ui: {
primary: 'green',
gray: 'cool',
},
})
1 change: 1 addition & 0 deletions nuxt.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,5 +8,6 @@ export default defineNuxtConfig({
greeting: '',
},
},
modules: ['@nuxt/ui'],
devtools: { enabled: true },
})
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
"prisma:studio": "prisma studio"
},
"dependencies": {
"@nuxt/ui": "^2.8.1",
"@prisma/client": "^5.3.1",
"nuxt": "^3.7.3"
},
Expand Down
8 changes: 0 additions & 8 deletions pages/about.vue

This file was deleted.

10 changes: 1 addition & 9 deletions pages/index.vue
Original file line number Diff line number Diff line change
Expand Up @@ -2,15 +2,7 @@
</script>

<template>
<div>
<div class="container mx-auto">
<h1>pages/index.vue</h1>

<h2>Envs</h2>
<div>
<h3>## Server</h3>
<p>DATABASE_URL: {{ $config.databaseUrl }} <span>(Note: Will be empty)</span></p>
<h3>## Client</h3>
<p>NUXT_PUBLIC_GREETING: {{ $config.public.greeting }}</p>
</div>
</div>
</template>
19 changes: 19 additions & 0 deletions pages/play.vue
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
<script lang="ts" setup>
</script>

<template>
<div class="container mx-auto">
<h1>pages/index.vue</h1>

<h2>Envs</h2>
<div>
<h3>## Server</h3>
<p>DATABASE_URL: {{ $config.databaseUrl }} <span>(Note: Will be empty)</span></p>
<h3>## Client</h3>
<p>NUXT_PUBLIC_GREETING: {{ $config.public.greeting }}</p>
</div>

<h2>NuxtUI</h2>
<UButton>Button</UButton>
</div>
</template>
Loading

0 comments on commit 121568d

Please sign in to comment.