Skip to content

Commit 638868e

Browse files
author
jdk.frontend
committed
first commit
0 parents  commit 638868e

20 files changed

+359
-0
lines changed

.gitignore

+24
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
# Nuxt dev/build outputs
2+
.output
3+
.data
4+
.nuxt
5+
.nitro
6+
.cache
7+
dist
8+
9+
# Node dependencies
10+
node_modules
11+
12+
# Logs
13+
logs
14+
*.log
15+
16+
# Misc
17+
.DS_Store
18+
.fleet
19+
.idea
20+
21+
# Local env files
22+
.env
23+
.env.*
24+
!.env.example

.idx/dev.nix

+60
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,60 @@
1+
# To learn more about how to use Nix to configure your environment
2+
# see: https://developers.google.com/idx/guides/customize-idx-env
3+
{ pkgs, packageManager, ... }: {
4+
# Which nixpkgs channel to use.
5+
channel = "stable-24.05"; # or "unstable"
6+
# Use https://search.nixos.org/packages to find packages
7+
packages = [
8+
pkgs.fastfetch
9+
pkgs.git
10+
pkgs.nodejs_22
11+
pkgs.bun
12+
pkgs.fastfetch
13+
];
14+
# Sets environment variables in the workspace
15+
env = {};
16+
idx = {
17+
# Search for the extensions you want on https://open-vsx.org/ and use "publisher.id"
18+
extensions = [
19+
"Vue.volar"
20+
"formulahendry.auto-close-tag"
21+
"formulahendry.auto-rename-tag"
22+
"sysoev.language-stylus"
23+
"antfu.unocss"
24+
"antfu.iconify"
25+
"cipchk.cssrem"
26+
"wix.vscode-import-cost"
27+
"xabikos.JavaScriptSnippets"
28+
"miguelsolorio.fluent-icons"
29+
"castrogusttavo.symbols"
30+
"michelemelluso.gitignore"
31+
"yuyinws.nuxt-module-intellisense"
32+
];
33+
# Enable previews
34+
previews = {
35+
enable = true;
36+
previews = {
37+
# web = {
38+
# # Example: run "npm run dev" with PORT set to IDX's defined port for previews,
39+
# # and show it in IDX's web preview panel
40+
# command = ["npm" "run" "dev"];
41+
# manager = "web";
42+
# env = {
43+
# # Environment variables to set for your server
44+
# PORT = "$PORT";
45+
# };
46+
# };
47+
};
48+
};
49+
# Workspace lifecycle hooks
50+
workspace = {
51+
onCreate = {
52+
npm-install = "bun install";
53+
# default.openFiles = [ ".idx/dev.nix" "README.md" ];
54+
};
55+
onStart = {
56+
dev = "bun dev";
57+
};
58+
};
59+
};
60+
}

README.md

+75
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,75 @@
1+
# Nuxt 3 Minimal Starter
2+
3+
Look at the [Nuxt 3 documentation](https://nuxt.com/docs/getting-started/introduction) to learn more.
4+
5+
## Setup
6+
7+
Make sure to install the dependencies:
8+
9+
```bash
10+
# npm
11+
npm install
12+
13+
# pnpm
14+
pnpm install
15+
16+
# yarn
17+
yarn install
18+
19+
# bun
20+
bun install
21+
```
22+
23+
## Development Server
24+
25+
Start the development server on `http://localhost:3000`:
26+
27+
```bash
28+
# npm
29+
npm run dev
30+
31+
# pnpm
32+
pnpm run dev
33+
34+
# yarn
35+
yarn dev
36+
37+
# bun
38+
bun run dev
39+
```
40+
41+
## Production
42+
43+
Build the application for production:
44+
45+
```bash
46+
# npm
47+
npm run build
48+
49+
# pnpm
50+
pnpm run build
51+
52+
# yarn
53+
yarn build
54+
55+
# bun
56+
bun run build
57+
```
58+
59+
Locally preview production build:
60+
61+
```bash
62+
# npm
63+
npm run preview
64+
65+
# pnpm
66+
pnpm run preview
67+
68+
# yarn
69+
yarn preview
70+
71+
# bun
72+
bun run preview
73+
```
74+
75+
Check out the [deployment documentation](https://nuxt.com/docs/getting-started/deployment) for more information.

app/app.vue

+13
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
<script setup>
2+
useHead({
3+
bodyAttrs: {
4+
class: `size-full min-h-100dvh max-w-screen bg-dark-950 text-light`
5+
}
6+
})
7+
</script>
8+
9+
<template>
10+
<NuxtLayout>
11+
<NuxtPage />
12+
</NuxtLayout>
13+
</template>

app/assets/styles/app.styl

+2
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
body
2+
font-family: 'Nunito', ui-rounded, 'Hiragino Maru Gothic ProN', Quicksand, Comfortaa, Manjari, 'Arial Rounded MT', 'Arial Rounded MT Bold', Calibri, source-sans-pro, sans-serif

app/components/Container.vue

+5
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
<template>
2+
<div :class="mc(`container mx-auto`, $attrs.class)">
3+
<slot />
4+
</div>
5+
</template>

app/layouts/default.vue

+7
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
<script setup>
2+
3+
</script>
4+
5+
<template>
6+
<slot />
7+
</template>

app/middleware/auth.global.js

+4
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
export default defineNuxtRouteMiddleware((to, from) => {
2+
3+
})
4+

app/pages/index.vue

+7
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
<script setup>
2+
3+
</script>
4+
5+
<template>
6+
123
7+
</template>

app/stores/couter.store.js

+14
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
export const useCounterStore = createStore("counter", ({ state, getter }) => {
2+
const count = state(0);
3+
const double = getter(() => count.value * 2);
4+
5+
const increment = () => {
6+
count.value++;
7+
};
8+
9+
return {
10+
count,
11+
increment,
12+
double,
13+
};
14+
});

app/utils/mc.js

+3
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
import { twMerge } from "tailwind-merge";
2+
import { clsx } from "clsx";
3+
export default (...args) => twMerge(clsx(args))

bun.lockb

331 KB
Binary file not shown.

nuxt.config.ts

+52
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,52 @@
1+
// https://nuxt.com/docs/api/configuration/nuxt-config
2+
export default defineNuxtConfig({
3+
modules: [
4+
'@unocss/nuxt',
5+
'@vueuse/nuxt',
6+
'@vaxee/nuxt',
7+
'@nuxt/fonts',
8+
'nuxt-workers'
9+
],
10+
css: [
11+
'@unocss/reset/tailwind.css',
12+
'assets/styles/app.styl'
13+
],
14+
components: {
15+
dirs: [
16+
{
17+
path: 'components',
18+
pathPrefix: false
19+
}
20+
]
21+
},
22+
fonts: {
23+
assets: {
24+
prefix: '/_fonts/'
25+
},
26+
families: [
27+
{ name: 'Nunito', provider: 'bunny' },
28+
]
29+
},
30+
ssr: false,
31+
app: {
32+
head: {
33+
meta: [
34+
{ name: 'viewport', content: 'width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no' },
35+
],
36+
},
37+
rootAttrs: {
38+
class: `size-full`
39+
}
40+
},
41+
experimental: {
42+
viewTransition: true,
43+
clientFallback: true,
44+
cookieStore: true,
45+
clientNodeCompat: true
46+
},
47+
compatibilityDate: '2024-04-03',
48+
devtools: { enabled: false },
49+
future: {
50+
compatibilityVersion: 4
51+
}
52+
})

package.json

+33
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
{
2+
"name": "nuxt-app",
3+
"private": true,
4+
"type": "module",
5+
"scripts": {
6+
"build": "nuxi build",
7+
"dev": "nuxi dev",
8+
"generate": "nuxi generate",
9+
"preview": "nuxi preview",
10+
"postinstall": "nuxi prepare",
11+
"clean": "nuxi cleanup"
12+
},
13+
"dependencies": {
14+
"nuxt": "latest",
15+
"vue": "latest"
16+
},
17+
"devDependencies": {
18+
"@vueuse/core": "latest",
19+
"@vueuse/nuxt": "latest",
20+
"@vueuse/integrations": "latest",
21+
"@vueuse/router": "latest",
22+
"@unocss/reset": "latest",
23+
"@unocss/nuxt": "latest",
24+
"unocss":"latest",
25+
"clsx": "latest",
26+
"tailwind-merge": "latest",
27+
"stylus": "latest",
28+
"vaxee": "latest",
29+
"@vaxee/nuxt": "latest",
30+
"@nuxt/fonts": "latest",
31+
"nuxt-workers": "latest"
32+
}
33+
}

public/favicon.ico

4.19 KB
Binary file not shown.

public/robots.txt

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+

server/api/test.get.js

+5
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
export default defineEventHandler(async (e) => {
2+
return {
3+
hello: 'world'
4+
}
5+
})

server/tsconfig.json

+3
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
{
2+
"extends": "../.nuxt/tsconfig.server.json"
3+
}

tsconfig.json

+4
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
{
2+
// https://nuxt.com/docs/guide/concepts/typescript
3+
"extends": "./.nuxt/tsconfig.json"
4+
}

uno.config.js

+47
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,47 @@
1+
import {
2+
defineConfig,
3+
presetAttributify,
4+
presetIcons,
5+
presetTypography,
6+
presetUno,
7+
presetWebFonts,
8+
transformerDirectives,
9+
transformerVariantGroup
10+
} from 'unocss'
11+
12+
export default defineConfig({
13+
rules: [
14+
],
15+
shortcuts: [
16+
{
17+
'absolute-center': 'absolute top-1/2 left-1/2 -translate-1/2',
18+
'absolute-full': 'absolute inset-0',
19+
},
20+
],
21+
extendTheme: (theme) => ({
22+
...theme,
23+
breakpoints: {
24+
...theme.breakpoints,
25+
xs: '375px',
26+
'3xl': '1920px',
27+
'4xl': '2560px'
28+
},
29+
keyframes: {
30+
...theme.keyframes
31+
}
32+
}),
33+
presets: [
34+
presetUno(),
35+
presetAttributify(),
36+
presetIcons({
37+
autoInstall: true,
38+
// cdn: 'https://esm.sh/',
39+
}),
40+
presetTypography(),
41+
presetWebFonts(),
42+
],
43+
transformers: [
44+
transformerDirectives(),
45+
transformerVariantGroup(),
46+
],
47+
})

0 commit comments

Comments
 (0)