Skip to content

Commit

Permalink
feat: 新增nuxt3 + vite3 前端 SSR 项目通用模板
Browse files Browse the repository at this point in the history
  • Loading branch information
jeddygong committed Nov 27, 2022
1 parent a35c1c5 commit aab86fc
Show file tree
Hide file tree
Showing 23 changed files with 5,020 additions and 1 deletion.
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,3 +27,5 @@
## 8. pnpm-tool-template
pnpm workspace + typescript 搭建的前端工具库项目模板

## 9. vite-nuxt3-app
nuxt3 + vite3 前端 SSR 项目通用模板
3 changes: 2 additions & 1 deletion pnpm-tool-template/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,8 @@
"lint": "eslint . --ext .vue,.js,.ts,.jsx,.tsx,.json --max-warnings 0 --cache",
"lint:fix": "pnpm run lint --fix",
"format": "prettier --write --cache .",
"test": "vitest test",
"test": "vitest run",
"test:update": "vitest test",
"coverage": "vitest run --coverage"
},
"lint-staged": {
Expand Down
8 changes: 8 additions & 0 deletions vite-nuxt3-app/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
node_modules
*.log*
.nuxt
.nitro
.cache
.output
.env
dist
1 change: 1 addition & 0 deletions vite-nuxt3-app/.npmrc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
shamefully-hoist=true
5 changes: 5 additions & 0 deletions vite-nuxt3-app/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@

# vite-nuxt3-app
> ## 这是一个nuxt3 + vite3 前端 SSR 项目通用模板
>
> ## 如果觉得项目模板不错的话,欢迎 Star 支持就好,感谢大家!
19 changes: 19 additions & 0 deletions vite-nuxt3-app/nuxt.config.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
// https://nuxt.com/docs/api/configuration/nuxt-config
export default defineNuxtConfig({
srcDir: 'src/',

modules: [
// ...
'@pinia/nuxt',
'@vueuse/nuxt'
],
vite: {
css: {
preprocessorOptions: {
scss: {
additionalData: '@import "@/assets/styles/default.scss";'
}
}
}
}
})
28 changes: 28 additions & 0 deletions vite-nuxt3-app/package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
{
"private": true,
"scripts": {
"build": "nuxt build",
"dev": "nuxt dev",
"generate": "nuxt generate",
"preview": "nuxt preview",
"postinstall": "nuxt prepare"
},
"devDependencies": {
"@typescript-eslint/eslint-plugin": "5.0.0",
"@typescript-eslint/parser": "^5.44.0",
"eslint": "^8.28.0",
"eslint-config-prettier": "^8.5.0",
"eslint-plugin-prettier": "^4.2.1",
"eslint-plugin-vue": "^9.8.0",
"nuxt": "3.0.0",
"prettier": "^2.8.0",
"sass": "^1.56.1",
"typescript": "^4.9.3"
},
"dependencies": {
"@pinia/nuxt": "^0.4.5",
"@vueuse/core": "^9.6.0",
"@vueuse/nuxt": "^9.6.0",
"pinia": "^2.0.26"
}
}
Loading

0 comments on commit aab86fc

Please sign in to comment.