mirror of
https://github.com/nuxt/nuxt.git
synced 2024-11-22 05:35:13 +00:00
fix(nuxi): forward nuxi generate
to nuxt
on nuxt 2 (#1571)
This commit is contained in:
parent
495aeffd74
commit
c420e46efe
@ -11,15 +11,12 @@
|
||||
"bin": {
|
||||
"nuxi": "./bin/nuxi.mjs"
|
||||
},
|
||||
"scripts": {
|
||||
"prepack": "unbuild"
|
||||
},
|
||||
"files": [
|
||||
"bin",
|
||||
"dist"
|
||||
],
|
||||
"optionalDependencies": {
|
||||
"fsevents": "~2.3.2"
|
||||
"scripts": {
|
||||
"prepack": "unbuild"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@nuxt/design": "0.1.4",
|
||||
@ -35,6 +32,7 @@
|
||||
"consola": "^2.15.3",
|
||||
"deep-object-diff": "^1.1.0",
|
||||
"destr": "^1.1.0",
|
||||
"execa": "^5.1.1",
|
||||
"flat": "^5.0.2",
|
||||
"jiti": "^1.12.9",
|
||||
"listhen": "^0.2.5",
|
||||
@ -45,14 +43,15 @@
|
||||
"pkg-types": "^0.3.1",
|
||||
"rimraf": "^3.0.2",
|
||||
"scule": "^0.2.1",
|
||||
"semver": "^7.3.5",
|
||||
"superb": "^4.0.0",
|
||||
"tiged": "^2.12.0",
|
||||
"unbuild": "latest"
|
||||
},
|
||||
"optionalDependencies": {
|
||||
"fsevents": "~2.3.2"
|
||||
},
|
||||
"engines": {
|
||||
"node": "^14.16.0 || ^16.11.0 || ^17.0.0"
|
||||
},
|
||||
"dependencies": {
|
||||
"semver": "^7.3.5"
|
||||
}
|
||||
}
|
||||
|
@ -1,3 +1,4 @@
|
||||
import execa from 'execa'
|
||||
import { resolve } from 'pathe'
|
||||
import { isNuxt3 } from '@nuxt/kit'
|
||||
|
||||
@ -20,7 +21,8 @@ export default defineNuxtCommand({
|
||||
if (isNuxt3(nuxt)) {
|
||||
throw new Error('`nuxt generate` is not supported in Nuxt 3. Please follow this RFC: https://git.io/JKfvx')
|
||||
} else {
|
||||
throw new Error('Please use `nuxt generate` for Nuxt 2 instead of `nuxi generate`')
|
||||
// Forwards argv to `nuxt generate`
|
||||
await execa('npx nuxt', process.argv.slice(2), { stdio: 'inherit' })
|
||||
}
|
||||
}
|
||||
})
|
||||
|
Loading…
Reference in New Issue
Block a user