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.
|
||||
|
||||
#### 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
|
||||
|
||||
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
|
||||
{
|
||||
"scripts": {
|
||||
"build": "nuxt generate"
|
||||
"build": "nuxi generate"
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
#### 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
|
||||
{
|
||||
"scripts": {
|
||||
"build": "nuxt build",
|
||||
"build": "nuxi build",
|
||||
"start": "node .output/server/index.mjs"
|
||||
}
|
||||
}
|
||||
|
@ -2,7 +2,7 @@
|
||||
"name": "docs",
|
||||
"private": true,
|
||||
"scripts": {
|
||||
"dev": "yarn gendocs && nuxt dev",
|
||||
"dev": "yarn gendocs && nuxi dev",
|
||||
"build": "yarn gendocs && nuxt generate --force-build",
|
||||
"build:ci": "yarn add @nuxt/kit@npm:@nuxt/kit-edge && yarn build",
|
||||
"gendocs": "jiti ./scripts/gen-docs.ts"
|
||||
|
@ -5,8 +5,8 @@
|
||||
"nuxt3": "latest"
|
||||
},
|
||||
"scripts": {
|
||||
"dev": "nuxt dev",
|
||||
"build": "nuxt build",
|
||||
"dev": "nuxi dev",
|
||||
"build": "nuxi build",
|
||||
"start": "node .output/server/index.mjs"
|
||||
}
|
||||
}
|
||||
|
@ -5,8 +5,8 @@
|
||||
"nuxt3": "latest"
|
||||
},
|
||||
"scripts": {
|
||||
"dev": "nuxt dev",
|
||||
"build": "nuxt build",
|
||||
"dev": "nuxi dev",
|
||||
"build": "nuxi build",
|
||||
"start": "node .output/server/index.mjs"
|
||||
}
|
||||
}
|
||||
|
@ -5,8 +5,8 @@
|
||||
"nuxt3": "latest"
|
||||
},
|
||||
"scripts": {
|
||||
"dev": "nuxt dev",
|
||||
"build": "nuxt build",
|
||||
"dev": "nuxi dev",
|
||||
"build": "nuxi build",
|
||||
"start": "node .output/server/index.mjs"
|
||||
}
|
||||
}
|
||||
|
@ -5,8 +5,8 @@
|
||||
"nuxt3": "latest"
|
||||
},
|
||||
"scripts": {
|
||||
"dev": "nuxt dev",
|
||||
"build": "nuxt build",
|
||||
"dev": "nuxi dev",
|
||||
"build": "nuxi build",
|
||||
"start": "node .output/server"
|
||||
}
|
||||
}
|
||||
|
@ -5,8 +5,8 @@
|
||||
"nuxt3": "latest"
|
||||
},
|
||||
"scripts": {
|
||||
"dev": "nuxt dev",
|
||||
"build": "nuxt build",
|
||||
"dev": "nuxi dev",
|
||||
"build": "nuxi build",
|
||||
"start": "node .output/server/index.mjs"
|
||||
}
|
||||
}
|
||||
|
@ -5,8 +5,8 @@
|
||||
"nuxt3": "latest"
|
||||
},
|
||||
"scripts": {
|
||||
"dev": "nuxt dev",
|
||||
"build": "nuxt build",
|
||||
"dev": "nuxi dev",
|
||||
"build": "nuxi build",
|
||||
"start": "node .output/server/index.mjs"
|
||||
}
|
||||
}
|
||||
|
@ -5,8 +5,8 @@
|
||||
"nuxt3": "latest"
|
||||
},
|
||||
"scripts": {
|
||||
"dev": "nuxt dev",
|
||||
"build": "nuxt build",
|
||||
"dev": "nuxi dev",
|
||||
"build": "nuxi build",
|
||||
"start": "node .output/server/index.mjs"
|
||||
}
|
||||
}
|
||||
|
@ -5,8 +5,8 @@
|
||||
"nuxt3": "latest"
|
||||
},
|
||||
"scripts": {
|
||||
"dev": "nuxt dev",
|
||||
"build": "nuxt build",
|
||||
"dev": "nuxi dev",
|
||||
"build": "nuxi build",
|
||||
"start": "node .output/server/index.mjs"
|
||||
}
|
||||
}
|
||||
|
@ -5,8 +5,8 @@
|
||||
"nuxt3": "latest"
|
||||
},
|
||||
"scripts": {
|
||||
"dev": "nuxt dev",
|
||||
"build": "nuxt build",
|
||||
"dev": "nuxi dev",
|
||||
"build": "nuxi build",
|
||||
"start": "node .output/server/index.mjs"
|
||||
}
|
||||
}
|
||||
|
@ -5,8 +5,8 @@
|
||||
"nuxt3": "latest"
|
||||
},
|
||||
"scripts": {
|
||||
"dev": "nuxt dev",
|
||||
"build": "nuxt build",
|
||||
"dev": "nuxi dev",
|
||||
"build": "nuxi build",
|
||||
"start": "node .output/server/index.mjs"
|
||||
}
|
||||
}
|
||||
|
@ -14,7 +14,7 @@
|
||||
"release": "yarn && yarn lint && FORCE_COLOR=1 lerna publish -m \"chore: release\" && yarn stub",
|
||||
"nuxi": "./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:build": "yarn workspace example-$0 build",
|
||||
"lint": "eslint --ext .vue,.ts,.js .",
|
||||
|
@ -5,8 +5,8 @@
|
||||
"nuxt3": "latest"
|
||||
},
|
||||
"scripts": {
|
||||
"dev": "nuxt dev",
|
||||
"build": "nuxt build",
|
||||
"dev": "nuxi dev",
|
||||
"build": "nuxi build",
|
||||
"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,
|
||||
"name": "fixture-bridge",
|
||||
"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,
|
||||
"name": "fixture-basic",
|
||||
"scripts": {
|
||||
"dev": "nuxt dev",
|
||||
"build": "nuxt build"
|
||||
"dev": "nuxi dev",
|
||||
"build": "nuxi build"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@nuxt/bridge": "*",
|
||||
|
Loading…
Reference in New Issue
Block a user