mirror of
https://github.com/nuxt/nuxt.git
synced 2024-11-22 05:35:13 +00:00
docs: use nuxi
everywhere (#1577)
This commit is contained in:
parent
f60f461410
commit
495aeffd74
@ -55,26 +55,43 @@ npm install -D @nuxt/bridge@npm:@nuxt/bridge-edge
|
|||||||
|
|
||||||
You will also need to update your scripts within your `package.json` to reflect the fact that Nuxt will now produce a Nitro server as build output.
|
You will also need to update your scripts within your `package.json` to reflect the fact that Nuxt will now produce a Nitro server as build output.
|
||||||
|
|
||||||
|
#### Nuxi
|
||||||
|
|
||||||
|
Nuxt 3 introduced the new Nuxt CLI command [`nuxi`](/getting-started/commands/). Update your scripts as follows to leverage the better support from Nuxt Bridge:
|
||||||
|
|
||||||
|
```diff
|
||||||
|
{
|
||||||
|
"scripts": {
|
||||||
|
- "dev": "nuxt",
|
||||||
|
+ "dev": "nuxi dev",
|
||||||
|
- "build": "nuxt build",
|
||||||
|
+ "build": "nuxi build",
|
||||||
|
- "start": "nuxt start",
|
||||||
|
+ "start": "node .output/server/index.mjs"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
||||||
#### Static target
|
#### Static target
|
||||||
|
|
||||||
If you have set `target: 'static'` in your `nuxt.config` then you need to ensure that you update your build script to be `nuxt generate`.
|
If you have set `target: 'static'` in your `nuxt.config` then you need to ensure that you update your build script to be `nuxi generate`.
|
||||||
|
|
||||||
```json
|
```json
|
||||||
{
|
{
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"build": "nuxt generate"
|
"build": "nuxi generate"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
```
|
```
|
||||||
|
|
||||||
#### Server target
|
#### Server target
|
||||||
|
|
||||||
For all other situations, you can use the normal `nuxt build` command.
|
For all other situations, you can use the `nuxi build` command.
|
||||||
|
|
||||||
```json
|
```json
|
||||||
{
|
{
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"build": "nuxt build",
|
"build": "nuxi build",
|
||||||
"start": "node .output/server/index.mjs"
|
"start": "node .output/server/index.mjs"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -2,7 +2,7 @@
|
|||||||
"name": "docs",
|
"name": "docs",
|
||||||
"private": true,
|
"private": true,
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"dev": "yarn gendocs && nuxt dev",
|
"dev": "yarn gendocs && nuxi dev",
|
||||||
"build": "yarn gendocs && nuxt generate --force-build",
|
"build": "yarn gendocs && nuxt generate --force-build",
|
||||||
"build:ci": "yarn add @nuxt/kit@npm:@nuxt/kit-edge && yarn build",
|
"build:ci": "yarn add @nuxt/kit@npm:@nuxt/kit-edge && yarn build",
|
||||||
"gendocs": "jiti ./scripts/gen-docs.ts"
|
"gendocs": "jiti ./scripts/gen-docs.ts"
|
||||||
|
@ -5,8 +5,8 @@
|
|||||||
"nuxt3": "latest"
|
"nuxt3": "latest"
|
||||||
},
|
},
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"dev": "nuxt dev",
|
"dev": "nuxi dev",
|
||||||
"build": "nuxt build",
|
"build": "nuxi build",
|
||||||
"start": "node .output/server/index.mjs"
|
"start": "node .output/server/index.mjs"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -5,8 +5,8 @@
|
|||||||
"nuxt3": "latest"
|
"nuxt3": "latest"
|
||||||
},
|
},
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"dev": "nuxt dev",
|
"dev": "nuxi dev",
|
||||||
"build": "nuxt build",
|
"build": "nuxi build",
|
||||||
"start": "node .output/server/index.mjs"
|
"start": "node .output/server/index.mjs"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -5,8 +5,8 @@
|
|||||||
"nuxt3": "latest"
|
"nuxt3": "latest"
|
||||||
},
|
},
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"dev": "nuxt dev",
|
"dev": "nuxi dev",
|
||||||
"build": "nuxt build",
|
"build": "nuxi build",
|
||||||
"start": "node .output/server/index.mjs"
|
"start": "node .output/server/index.mjs"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -5,8 +5,8 @@
|
|||||||
"nuxt3": "latest"
|
"nuxt3": "latest"
|
||||||
},
|
},
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"dev": "nuxt dev",
|
"dev": "nuxi dev",
|
||||||
"build": "nuxt build",
|
"build": "nuxi build",
|
||||||
"start": "node .output/server"
|
"start": "node .output/server"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -5,8 +5,8 @@
|
|||||||
"nuxt3": "latest"
|
"nuxt3": "latest"
|
||||||
},
|
},
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"dev": "nuxt dev",
|
"dev": "nuxi dev",
|
||||||
"build": "nuxt build",
|
"build": "nuxi build",
|
||||||
"start": "node .output/server/index.mjs"
|
"start": "node .output/server/index.mjs"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -5,8 +5,8 @@
|
|||||||
"nuxt3": "latest"
|
"nuxt3": "latest"
|
||||||
},
|
},
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"dev": "nuxt dev",
|
"dev": "nuxi dev",
|
||||||
"build": "nuxt build",
|
"build": "nuxi build",
|
||||||
"start": "node .output/server/index.mjs"
|
"start": "node .output/server/index.mjs"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -5,8 +5,8 @@
|
|||||||
"nuxt3": "latest"
|
"nuxt3": "latest"
|
||||||
},
|
},
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"dev": "nuxt dev",
|
"dev": "nuxi dev",
|
||||||
"build": "nuxt build",
|
"build": "nuxi build",
|
||||||
"start": "node .output/server/index.mjs"
|
"start": "node .output/server/index.mjs"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -5,8 +5,8 @@
|
|||||||
"nuxt3": "latest"
|
"nuxt3": "latest"
|
||||||
},
|
},
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"dev": "nuxt dev",
|
"dev": "nuxi dev",
|
||||||
"build": "nuxt build",
|
"build": "nuxi build",
|
||||||
"start": "node .output/server/index.mjs"
|
"start": "node .output/server/index.mjs"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -5,8 +5,8 @@
|
|||||||
"nuxt3": "latest"
|
"nuxt3": "latest"
|
||||||
},
|
},
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"dev": "nuxt dev",
|
"dev": "nuxi dev",
|
||||||
"build": "nuxt build",
|
"build": "nuxi build",
|
||||||
"start": "node .output/server/index.mjs"
|
"start": "node .output/server/index.mjs"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -5,8 +5,8 @@
|
|||||||
"nuxt3": "latest"
|
"nuxt3": "latest"
|
||||||
},
|
},
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"dev": "nuxt dev",
|
"dev": "nuxi dev",
|
||||||
"build": "nuxt build",
|
"build": "nuxi build",
|
||||||
"start": "node .output/server/index.mjs"
|
"start": "node .output/server/index.mjs"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -14,7 +14,7 @@
|
|||||||
"release": "yarn && yarn lint && FORCE_COLOR=1 lerna publish -m \"chore: release\" && yarn stub",
|
"release": "yarn && yarn lint && FORCE_COLOR=1 lerna publish -m \"chore: release\" && yarn stub",
|
||||||
"nuxi": "./node_modules/.bin/nuxi",
|
"nuxi": "./node_modules/.bin/nuxi",
|
||||||
"nuxt": "./node_modules/.bin/nuxi",
|
"nuxt": "./node_modules/.bin/nuxi",
|
||||||
"play": "yarn run nuxt dev playground",
|
"play": "yarn run nuxi dev playground",
|
||||||
"example": "yarn workspace example-$0 dev",
|
"example": "yarn workspace example-$0 dev",
|
||||||
"example:build": "yarn workspace example-$0 build",
|
"example:build": "yarn workspace example-$0 build",
|
||||||
"lint": "eslint --ext .vue,.ts,.js .",
|
"lint": "eslint --ext .vue,.ts,.js .",
|
||||||
|
@ -5,8 +5,8 @@
|
|||||||
"nuxt3": "latest"
|
"nuxt3": "latest"
|
||||||
},
|
},
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"dev": "nuxt dev",
|
"dev": "nuxi dev",
|
||||||
"build": "nuxt build",
|
"build": "nuxi build",
|
||||||
"start": "node .output/server/index.mjs"
|
"start": "node .output/server/index.mjs"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
2
test/fixtures/basic/package.json
vendored
2
test/fixtures/basic/package.json
vendored
@ -2,6 +2,6 @@
|
|||||||
"private": true,
|
"private": true,
|
||||||
"name": "fixture-bridge",
|
"name": "fixture-bridge",
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"build": "nuxt build"
|
"build": "nuxi build"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
4
test/fixtures/bridge/package.json
vendored
4
test/fixtures/bridge/package.json
vendored
@ -2,8 +2,8 @@
|
|||||||
"private": true,
|
"private": true,
|
||||||
"name": "fixture-basic",
|
"name": "fixture-basic",
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"dev": "nuxt dev",
|
"dev": "nuxi dev",
|
||||||
"build": "nuxt build"
|
"build": "nuxi build"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@nuxt/bridge": "*",
|
"@nuxt/bridge": "*",
|
||||||
|
Loading…
Reference in New Issue
Block a user