Skip to content

Commit 0a54951

Browse files
committed
init
0 parents  commit 0a54951

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

43 files changed

+13478
-0
lines changed

.github/FUNDING.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
open_collective: antfu
2+
github: [antfu]

.github/workflows/ci.yml

Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
name: CI
2+
3+
on:
4+
push:
5+
branches:
6+
- main
7+
8+
pull_request:
9+
branches:
10+
- main
11+
12+
jobs:
13+
lint:
14+
runs-on: ubuntu-latest
15+
steps:
16+
- uses: actions/checkout@v3
17+
- uses: pnpm/action-setup@v2
18+
- uses: actions/setup-node@v3
19+
with:
20+
node-version: lts/*
21+
cache: pnpm
22+
23+
- name: Install
24+
run: pnpm install
25+
26+
- name: Lint
27+
run: pnpm run lint
28+
29+
typecheck:
30+
runs-on: ubuntu-latest
31+
steps:
32+
- uses: actions/checkout@v3
33+
- uses: pnpm/action-setup@v2
34+
- uses: actions/setup-node@v3
35+
with:
36+
node-version: lts/*
37+
cache: pnpm
38+
39+
- name: Install
40+
run: pnpm install
41+
42+
- name: Typecheck
43+
run: pnpm run typecheck

.gitignore

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
node_modules
2+
*.log
3+
dist
4+
.output
5+
.nuxt
6+
.env
7+
.idea/

.npmrc

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
shamefully-hoist=true
2+
strict-peer-dependencies=false
3+
shell-emulator=true

.stackblitzrc

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
{
2+
"installDependencies": true,
3+
"startCommand": "npm run dev"
4+
}

.vscode/extensions.json

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
{
2+
"recommendations": [
3+
"antfu.iconify",
4+
"antfu.unocss",
5+
"antfu.goto-alias",
6+
"csstools.postcss",
7+
"dbaeumer.vscode-eslint",
8+
"vue.volar"
9+
]
10+
}

.vscode/settings.json

Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
{
2+
"files.associations": {
3+
"*.css": "postcss"
4+
},
5+
6+
// Disable the default formatter, use eslint instead
7+
"prettier.enable": false,
8+
"editor.formatOnSave": false,
9+
10+
// Auto fix
11+
"editor.codeActionsOnSave": {
12+
"source.fixAll.eslint": "explicit",
13+
"source.organizeImports": "never"
14+
},
15+
16+
// Silent the stylistic rules in you IDE, but still auto fix them
17+
"eslint.rules.customizations": [
18+
{ "rule": "style/*", "severity": "off" },
19+
{ "rule": "*-indent", "severity": "off" },
20+
{ "rule": "*-spacing", "severity": "off" },
21+
{ "rule": "*-spaces", "severity": "off" },
22+
{ "rule": "*-order", "severity": "off" },
23+
{ "rule": "*-dangle", "severity": "off" },
24+
{ "rule": "*-newline", "severity": "off" },
25+
{ "rule": "*quotes", "severity": "off" },
26+
{ "rule": "*semi", "severity": "off" }
27+
],
28+
29+
// Enable eslint for all supported languages
30+
"eslint.validate": [
31+
"javascript",
32+
"javascriptreact",
33+
"typescript",
34+
"typescriptreact",
35+
"vue",
36+
"html",
37+
"markdown",
38+
"json",
39+
"jsonc",
40+
"yaml"
41+
],
42+
"interline-translate.knownPopularWordCount": 6000,
43+
"iconify.annotations": true,
44+
"iconify.inplace": true
45+
}

LICENSE

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
MIT License
2+
3+
Copyright (c) 2021-PRESENT Anthony Fu<https://github.com/antfu>
4+
5+
Permission is hereby granted, free of charge, to any person obtaining a copy
6+
of this software and associated documentation files (the "Software"), to deal
7+
in the Software without restriction, including without limitation the rights
8+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9+
copies of the Software, and to permit persons to whom the Software is
10+
furnished to do so, subject to the following conditions:
11+
12+
The above copyright notice and this permission notice shall be included in all
13+
copies or substantial portions of the Software.
14+
15+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21+
SOFTWARE.

README.md

Lines changed: 80 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,80 @@
1+
<p align="center">
2+
<img src="https://user-images.githubusercontent.com/11247099/140462375-7b7ac4db-35b7-453c-8a05-13d8d20282c4.png" width="600"/>
3+
</p>
4+
5+
<h2 align="center">
6+
<a href="https://github.com/antfu/vitesse">Vitesse</a> for Nuxt 3
7+
</h2><br>
8+
9+
<p align="center">
10+
<br>
11+
<a href="https://vitesse-nuxt3.netlify.app/">🖥 Online Preview</a>
12+
<br><br>
13+
<a href="https://stackblitz.com/github/antfu/vitesse-nuxt"><img src="https://developer.stackblitz.com/img/open_in_stackblitz.svg" alt=""></a>
14+
</p>
15+
16+
## Features
17+
18+
- 💚 [Nuxt 3](https://nuxt.com/) - SSR, ESR, File-based routing, components auto importing, modules, etc.
19+
20+
- ⚡️ Vite - Instant HMR.
21+
22+
- 🎨 [UnoCSS](https://github.com/unocss/unocss) - The instant on-demand atomic CSS engine.
23+
24+
- 😃 Use icons from any icon sets in Pure CSS, powered by [UnoCSS](https://github.com/unocss/unocss).
25+
26+
- 🔥 The `<script setup>` syntax.
27+
28+
- 🍍 [State Management via Pinia](https://github.com/vuejs/pinia), see [./app/composables/user.ts](./app/composables/user.ts).
29+
30+
- 📑 [Layout system](./app/layouts).
31+
32+
- 📥 APIs auto importing - for Composition API, VueUse and custom composables.
33+
34+
- 🏎 Zero-config cloud functions and deploy.
35+
36+
- 🦾 TypeScript, of course.
37+
38+
- 📲 [PWA](https://github.com/vite-pwa/nuxt) with offline support and auto-update behavior.
39+
40+
## Plugins
41+
42+
### Nuxt Modules
43+
44+
- [VueUse](https://github.com/vueuse/vueuse) - collection of useful composition APIs.
45+
- [ColorMode](https://github.com/nuxt-modules/color-mode) - dark and Light mode with auto detection made easy with Nuxt.
46+
- [UnoCSS](https://github.com/unocss/unocss) - the instant on-demand atomic CSS engine.
47+
- [Pinia](https://github.com/vuejs/pinia) - intuitive, type safe, light and flexible Store for Vue.
48+
- [VitePWA](https://github.com/vite-pwa/nuxt) - zero-config PWA Plugin for Nuxt 3.
49+
- [DevTools](https://github.com/nuxt/devtools) - unleash Nuxt Developer Experience.
50+
51+
## IDE
52+
53+
We recommend using [VS Code](https://code.visualstudio.com/) with [Volar](https://github.com/johnsoncodehk/volar) to get the best experience (You might want to disable [Vetur](https://vuejs.github.io/vetur/) if you have it).
54+
55+
## Variations
56+
57+
- [vitesse](https://github.com/antfu/vitesse) - Opinionated Vite Starter Template
58+
- [vitesse-lite](https://github.com/antfu/vitesse-lite) - Lightweight version of Vitesse
59+
- [vitesse-nuxt-bridge](https://github.com/antfu/vitesse-nuxt-bridge) - Vitesse for Nuxt 2 with Bridge
60+
- [vitesse-webext](https://github.com/antfu/vitesse-webext) - WebExtension Vite starter template
61+
62+
## Try it now!
63+
64+
### Online
65+
66+
<a href="https://stackblitz.com/github/antfu/vitesse-nuxt"><img src="https://developer.stackblitz.com/img/open_in_stackblitz.svg" alt=""></a>
67+
68+
### GitHub Template
69+
70+
[Create a repo from this template on GitHub](https://github.com/antfu/vitesse-nuxt/generate).
71+
72+
### Clone to local
73+
74+
If you prefer to do it manually with the cleaner git history
75+
76+
```bash
77+
npx degit antfu/vitesse-nuxt my-nuxt-app
78+
cd my-nuxt-app
79+
pnpm i # If you don't have pnpm installed, run: npm install -g pnpm
80+
```

app/app.vue

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
<script setup lang="ts">
2+
import { appName } from '~/constants'
3+
4+
useHead({
5+
title: appName,
6+
})
7+
</script>
8+
9+
<template>
10+
<VitePwaManifest />
11+
<NuxtLayout>
12+
<NuxtPage />
13+
</NuxtLayout>
14+
</template>
15+
16+
<style>
17+
html,
18+
body,
19+
#__nuxt {
20+
height: 100vh;
21+
margin: 0;
22+
padding: 0;
23+
}
24+
25+
html.dark {
26+
background: #222;
27+
color: white;
28+
}
29+
</style>

0 commit comments

Comments
 (0)