Skip to content

Commit 3fc880b

Browse files
authored
copy nuxtjs example from vercel/vercel (#1022)
1 parent 9a0a814 commit 3fc880b

File tree

9 files changed

+6280
-0
lines changed

9 files changed

+6280
-0
lines changed
Lines changed: 95 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,95 @@
1+
# Created by .ignore support plugin (hsz.mobi)
2+
### Node template
3+
# Logs
4+
logs
5+
*.log
6+
npm-debug.log*
7+
yarn-debug.log*
8+
yarn-error.log*
9+
10+
# Runtime data
11+
pids
12+
*.pid
13+
*.seed
14+
*.pid.lock
15+
16+
# Directory for instrumented libs generated by jscoverage/JSCover
17+
lib-cov
18+
19+
# Coverage directory used by tools like istanbul
20+
coverage
21+
22+
# nyc test coverage
23+
.nyc_output
24+
25+
# Grunt intermediate storage (http://gruntjs.com/creating-plugins#storing-task-files)
26+
.grunt
27+
28+
# Bower dependency directory (https://bower.io/)
29+
bower_components
30+
31+
# node-waf configuration
32+
.lock-wscript
33+
34+
# Compiled binary addons (https://nodejs.org/api/addons.html)
35+
build/Release
36+
37+
# Dependency directories
38+
node_modules/
39+
jspm_packages/
40+
41+
# TypeScript v1 declaration files
42+
typings/
43+
44+
# Optional npm cache directory
45+
.npm
46+
47+
# Optional eslint cache
48+
.eslintcache
49+
50+
# Optional REPL history
51+
.node_repl_history
52+
53+
# Output of 'npm pack'
54+
*.tgz
55+
56+
# Yarn Integrity file
57+
.yarn-integrity
58+
59+
# dotenv environment variables file
60+
.env
61+
.env.build
62+
63+
# parcel-bundler cache (https://parceljs.org/)
64+
.cache
65+
66+
# next.js build output
67+
.next
68+
69+
# nuxt.js build output
70+
.nuxt
71+
.output
72+
73+
# Nuxt generate
74+
dist
75+
76+
# vuepress build output
77+
.vuepress/dist
78+
79+
# Serverless directories
80+
.serverless
81+
82+
# IDE / Editor
83+
.idea
84+
85+
# Service worker
86+
sw.*
87+
88+
# macOS
89+
.DS_Store
90+
91+
# Vim swap files
92+
*.swp
93+
94+
# Vercel
95+
.vercel
Lines changed: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,48 @@
1+
# Nuxt Example
2+
3+
Deploy your [Nuxt](https://nuxt.com) project to Vercel with zero configuration.
4+
5+
[![Deploy with Vercel](https://vercel.com/button)](https://vercel.com/new/clone?repository-url=https://github.com/vercel/examples/tree/main/framework-boilerplates/nuxtjs&template=nuxtjs)
6+
7+
_Live Example: https://nuxtjs-template.vercel.app_
8+
9+
Look at the [Nuxt 3 documentation](https://v3.nuxtjs.org) to learn more.
10+
11+
## Setup
12+
13+
Make sure to install the dependencies:
14+
15+
```bash
16+
# yarn
17+
yarn
18+
19+
# npm
20+
npm install
21+
22+
# pnpm
23+
pnpm install --shamefully-hoist
24+
```
25+
26+
## Development Server
27+
28+
Start the development server on http://localhost:3000
29+
30+
```bash
31+
npm run dev
32+
```
33+
34+
## Production
35+
36+
Build the application for production:
37+
38+
```bash
39+
npm run build
40+
```
41+
42+
Locally preview production build:
43+
44+
```bash
45+
npm run preview
46+
```
47+
48+
Checkout the [deployment documentation](https://nuxt.com/docs/getting-started/deployment#presets) for more information.

framework-boilerplates/nuxtjs/app.vue

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
<template>
2+
<div>
3+
<NuxtWelcome />
4+
</div>
5+
</template>
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
// https://nuxt.com/docs/api/configuration/nuxt-config
2+
export default defineNuxtConfig({
3+
devtools: { enabled: true },
4+
routeRules: {
5+
// prerender index route by default
6+
'/': { prerender: true },
7+
},
8+
});
Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
{
2+
"private": true,
3+
"type": "module",
4+
"scripts": {
5+
"build": "nuxt build",
6+
"dev": "nuxt dev",
7+
"generate": "nuxt generate",
8+
"preview": "nuxt preview",
9+
"postinstall": "nuxt prepare"
10+
},
11+
"devDependencies": {
12+
"@nuxt/devtools": "^1.0.3",
13+
"nuxt": "^3.8.2",
14+
"vue": "^3.3.8",
15+
"vue-router": "^4.2.5"
16+
}
17+
}

0 commit comments

Comments
 (0)