feat: init commit
This commit is contained in:
commit
6eafd97557
|
@ -0,0 +1,24 @@
|
|||
# Nuxt dev/build outputs
|
||||
.output
|
||||
.data
|
||||
.nuxt
|
||||
.nitro
|
||||
.cache
|
||||
dist
|
||||
|
||||
# Node dependencies
|
||||
node_modules
|
||||
|
||||
# Logs
|
||||
logs
|
||||
*.log
|
||||
|
||||
# Misc
|
||||
.DS_Store
|
||||
.fleet
|
||||
.idea
|
||||
|
||||
# Local env files
|
||||
.env
|
||||
.env.*
|
||||
!.env.example
|
|
@ -0,0 +1 @@
|
|||
pnpm test
|
|
@ -0,0 +1,75 @@
|
|||
# Nuxt UI Minimal Starter
|
||||
|
||||
Look at [Nuxt docs](https://nuxt.com/docs/getting-started/introduction) and [Nuxt UI docs](https://ui.nuxt.com) to learn more.
|
||||
|
||||
## Setup
|
||||
|
||||
Make sure to install the dependencies:
|
||||
|
||||
```bash
|
||||
# npm
|
||||
npm install
|
||||
|
||||
# pnpm
|
||||
pnpm install
|
||||
|
||||
# yarn
|
||||
yarn install
|
||||
|
||||
# bun
|
||||
bun install
|
||||
```
|
||||
|
||||
## Development Server
|
||||
|
||||
Start the development server on `http://localhost:3000`:
|
||||
|
||||
```bash
|
||||
# npm
|
||||
npm run dev
|
||||
|
||||
# pnpm
|
||||
pnpm run dev
|
||||
|
||||
# yarn
|
||||
yarn dev
|
||||
|
||||
# bun
|
||||
bun run dev
|
||||
```
|
||||
|
||||
## Production
|
||||
|
||||
Build the application for production:
|
||||
|
||||
```bash
|
||||
# npm
|
||||
npm run build
|
||||
|
||||
# pnpm
|
||||
pnpm run build
|
||||
|
||||
# yarn
|
||||
yarn build
|
||||
|
||||
# bun
|
||||
bun run build
|
||||
```
|
||||
|
||||
Locally preview production build:
|
||||
|
||||
```bash
|
||||
# npm
|
||||
npm run preview
|
||||
|
||||
# pnpm
|
||||
pnpm run preview
|
||||
|
||||
# yarn
|
||||
yarn preview
|
||||
|
||||
# bun
|
||||
bun run preview
|
||||
```
|
||||
|
||||
Check out the [deployment documentation](https://nuxt.com/docs/getting-started/deployment) for more information.
|
|
@ -0,0 +1,6 @@
|
|||
export default defineAppConfig({
|
||||
ui: {
|
||||
primary: 'lime',
|
||||
gray: 'neutral',
|
||||
}
|
||||
})
|
|
@ -0,0 +1,9 @@
|
|||
<script setup lang="ts">
|
||||
import ProductCard from '~/src/entities/product/ui/ProductCard.vue'
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<UContainer>
|
||||
<ProductCard />
|
||||
</UContainer>
|
||||
</template>
|
|
@ -0,0 +1,7 @@
|
|||
// @ts-check
|
||||
import withNuxt from './.nuxt/eslint.config.mjs'
|
||||
import antfu from '@antfu/eslint-config'
|
||||
|
||||
export default withNuxt(
|
||||
antfu()
|
||||
)
|
|
@ -0,0 +1,13 @@
|
|||
// https://nuxt.com/docs/api/configuration/nuxt-config
|
||||
export default defineNuxtConfig({
|
||||
devtools: { enabled: true },
|
||||
modules: ['@nuxt/ui', '@nuxt/eslint'],
|
||||
eslint: {
|
||||
config: {
|
||||
standalone: false,
|
||||
},
|
||||
},
|
||||
colorMode: {
|
||||
preference: 'light',
|
||||
},
|
||||
})
|
|
@ -0,0 +1,29 @@
|
|||
{
|
||||
"name": "nuxt-app",
|
||||
"private": true,
|
||||
"type": "module",
|
||||
"scripts": {
|
||||
"build": "nuxt build",
|
||||
"dev": "nuxt dev",
|
||||
"generate": "nuxt generate",
|
||||
"preview": "nuxt preview",
|
||||
"postinstall": "nuxt prepare",
|
||||
"prepare": "husky"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@antfu/eslint-config": "^2.18.1",
|
||||
"@nuxt/devtools": "latest",
|
||||
"@nuxt/eslint": "^0.3.13",
|
||||
"@nuxt/ui": "^2.13.0",
|
||||
"eslint": "^9.3.0",
|
||||
"husky": "^9.0.11",
|
||||
"lint-staged": "^15.2.4",
|
||||
"nuxt": "^3.10.1",
|
||||
"orval": "^6.29.1",
|
||||
"typescript": "^5.4.5",
|
||||
"vue-tsc": "^2.0.19"
|
||||
},
|
||||
"dependencies": {
|
||||
"@tanstack/vue-query": "^5.37.1"
|
||||
}
|
||||
}
|
|
@ -0,0 +1,36 @@
|
|||
import type {
|
||||
DehydratedState,
|
||||
VueQueryPluginOptions,
|
||||
} from '@tanstack/vue-query'
|
||||
import {
|
||||
VueQueryPlugin,
|
||||
QueryClient,
|
||||
hydrate,
|
||||
dehydrate,
|
||||
} from '@tanstack/vue-query'
|
||||
// Nuxt 3 app aliases
|
||||
import { defineNuxtPlugin, useState } from '#imports'
|
||||
|
||||
export default defineNuxtPlugin((nuxt) => {
|
||||
const vueQueryState = useState<DehydratedState | null>('vue-query')
|
||||
|
||||
// Modify your Vue Query global settings here
|
||||
const queryClient = new QueryClient({
|
||||
defaultOptions: { queries: { staleTime: 5000 } },
|
||||
})
|
||||
const options: VueQueryPluginOptions = { queryClient }
|
||||
|
||||
nuxt.vueApp.use(VueQueryPlugin, options)
|
||||
|
||||
if (import.meta.server) {
|
||||
nuxt.hooks.hook('app:rendered', () => {
|
||||
vueQueryState.value = dehydrate(queryClient)
|
||||
})
|
||||
}
|
||||
|
||||
if (import.meta.client) {
|
||||
nuxt.hooks.hook('app:created', () => {
|
||||
hydrate(queryClient, vueQueryState.value)
|
||||
})
|
||||
}
|
||||
})
|
File diff suppressed because it is too large
Load Diff
Binary file not shown.
After Width: | Height: | Size: 4.2 KiB |
|
@ -0,0 +1,3 @@
|
|||
{
|
||||
"extends": "../.nuxt/tsconfig.server.json"
|
||||
}
|
|
@ -0,0 +1,17 @@
|
|||
<script setup lang="ts">
|
||||
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<UContainer>
|
||||
<UCard class="h-50">
|
||||
<UBadge color="primary" variant="subtle">
|
||||
Новинка
|
||||
</UBadge>
|
||||
</UCard>
|
||||
</UContainer>
|
||||
</template>
|
||||
|
||||
<style scoped>
|
||||
|
||||
</style>
|
|
@ -0,0 +1,4 @@
|
|||
{
|
||||
// https://nuxt.com/docs/guide/concepts/typescript
|
||||
"extends": "./.nuxt/tsconfig.json"
|
||||
}
|
Loading…
Reference in New Issue