mirror of
https://github.com/nuxt/nuxt.git
synced 2024-11-24 22:55:13 +00:00
refactor: rename nuxt-cli
to nuxi
(#430)
This commit is contained in:
parent
cbce777add
commit
084b4e2123
@ -5,8 +5,8 @@
|
|||||||
"nuxt3": "latest"
|
"nuxt3": "latest"
|
||||||
},
|
},
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"dev": "nu dev",
|
"dev": "nuxt dev",
|
||||||
"build": "nu build",
|
"build": "nuxt build",
|
||||||
"start": "node .output/server/index.mjs"
|
"start": "node .output/server/index.mjs"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -5,8 +5,8 @@
|
|||||||
"nuxt3": "latest"
|
"nuxt3": "latest"
|
||||||
},
|
},
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"dev": "nu dev",
|
"dev": "nuxt dev",
|
||||||
"build": "nu build",
|
"build": "nuxt build",
|
||||||
"start": "node .output/server/index.mjs"
|
"start": "node .output/server/index.mjs"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -5,8 +5,8 @@
|
|||||||
"nuxt3": "latest"
|
"nuxt3": "latest"
|
||||||
},
|
},
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"dev": "nu dev",
|
"dev": "nuxt dev",
|
||||||
"build": "nu build",
|
"build": "nuxt build",
|
||||||
"start": "node .output/server/index.mjs"
|
"start": "node .output/server/index.mjs"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -5,8 +5,8 @@
|
|||||||
"nuxt3": "latest"
|
"nuxt3": "latest"
|
||||||
},
|
},
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"dev": "nu dev",
|
"dev": "nuxt dev",
|
||||||
"build": "nu build",
|
"build": "nuxt build",
|
||||||
"start": "node .output/server"
|
"start": "node .output/server"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -5,8 +5,8 @@
|
|||||||
"nuxt3": "latest"
|
"nuxt3": "latest"
|
||||||
},
|
},
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"dev": "nu dev",
|
"dev": "nuxt dev",
|
||||||
"build": "nu build",
|
"build": "nuxt build",
|
||||||
"start": "node .output/server/index.mjs"
|
"start": "node .output/server/index.mjs"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -5,8 +5,8 @@
|
|||||||
"nuxt3": "latest"
|
"nuxt3": "latest"
|
||||||
},
|
},
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"dev": "nu dev",
|
"dev": "nuxt dev",
|
||||||
"build": "nu build",
|
"build": "nuxt build",
|
||||||
"start": "node .output/server/index.mjs"
|
"start": "node .output/server/index.mjs"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -5,8 +5,8 @@
|
|||||||
"nuxt3": "latest"
|
"nuxt3": "latest"
|
||||||
},
|
},
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"dev": "nu dev",
|
"dev": "nuxt dev",
|
||||||
"build": "nu build",
|
"build": "nuxt build",
|
||||||
"start": "node .output/server/index.mjs"
|
"start": "node .output/server/index.mjs"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -5,8 +5,8 @@
|
|||||||
"nuxt3": "latest"
|
"nuxt3": "latest"
|
||||||
},
|
},
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"dev": "nu dev",
|
"dev": "nuxt dev",
|
||||||
"build": "nu build",
|
"build": "nuxt build",
|
||||||
"start": "node .output/server/index.mjs"
|
"start": "node .output/server/index.mjs"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -7,8 +7,8 @@
|
|||||||
"vue-content-loader": "^2.0.0"
|
"vue-content-loader": "^2.0.0"
|
||||||
},
|
},
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"dev": "nu dev",
|
"dev": "nuxt dev",
|
||||||
"build": "nu build",
|
"build": "nuxt build",
|
||||||
"start": "node .output/server/index.mjs"
|
"start": "node .output/server/index.mjs"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -10,9 +10,11 @@
|
|||||||
"build": "FORCE_COLOR=1 lerna run prepack --stream --no-prefix",
|
"build": "FORCE_COLOR=1 lerna run prepack --stream --no-prefix",
|
||||||
"stub": "lerna run prepack -- --stub",
|
"stub": "lerna run prepack -- --stub",
|
||||||
"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",
|
||||||
"docs": "yarn nu dev docs",
|
"docs": "yarn nuxt dev docs",
|
||||||
"nu": "./node_modules/.bin/nu",
|
"nuxi": "./node_modules/.bin/nuxi",
|
||||||
"play": "yarn run nu dev playground",
|
"nu": "./node_modules/.bin/nuxi",
|
||||||
|
"nuxt": "./node_modules/.bin/nuxi",
|
||||||
|
"play": "yarn run nuxt 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 .",
|
||||||
|
@ -69,7 +69,7 @@ export interface NuxtHooks {
|
|||||||
'config': (options: NuxtConfig) => HookResult
|
'config': (options: NuxtConfig) => HookResult
|
||||||
'run:before': (options: { argv: string[], cmd: { name: string, usage: string, description: string, options: Record<string, any> }, rootDir: string }) => HookResult
|
'run:before': (options: { argv: string[], cmd: { name: string, usage: string, description: string, options: Record<string, any> }, rootDir: string }) => HookResult
|
||||||
|
|
||||||
// nuxt-cli
|
// nuxi
|
||||||
'prepare:types': (options: { references: TSReference[], declarations: string[] }) => HookResult
|
'prepare:types': (options: { references: TSReference[], declarations: string[] }) => HookResult
|
||||||
|
|
||||||
// @nuxt/core
|
// @nuxt/core
|
||||||
|
@ -1,13 +1,13 @@
|
|||||||
{
|
{
|
||||||
"name": "nuxt-cli",
|
"name": "nuxi",
|
||||||
"version": "0.3.8",
|
"version": "0.3.8",
|
||||||
"repository": "nuxt/framework",
|
"repository": "nuxt/framework",
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
"main": "./dist/index.js",
|
"main": "./dist/index.js",
|
||||||
"bin": {
|
"bin": {
|
||||||
"nu": "./bin/nuxt.js",
|
"nu": "./bin/nuxi.js",
|
||||||
"nuxt": "./bin/nuxt.js",
|
"nuxi": "./bin/nuxi.js",
|
||||||
"nuxt-cli": "./bin/nuxt.js"
|
"nuxt": "./bin/nuxi.js"
|
||||||
},
|
},
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"prepack": "unbuild"
|
"prepack": "unbuild"
|
@ -7,7 +7,7 @@ import { defineNuxtCommand } from './index'
|
|||||||
export default defineNuxtCommand({
|
export default defineNuxtCommand({
|
||||||
meta: {
|
meta: {
|
||||||
name: 'build',
|
name: 'build',
|
||||||
usage: 'nu build [rootDir]',
|
usage: 'npx nuxi build [rootDir]',
|
||||||
description: 'Build nuxt for production deployment'
|
description: 'Build nuxt for production deployment'
|
||||||
},
|
},
|
||||||
async invoke (args) {
|
async invoke (args) {
|
@ -11,7 +11,7 @@ import { defineNuxtCommand } from './index'
|
|||||||
export default defineNuxtCommand({
|
export default defineNuxtCommand({
|
||||||
meta: {
|
meta: {
|
||||||
name: 'dev',
|
name: 'dev',
|
||||||
usage: 'nu dev [rootDir] [--clipboard] [--open, -o]',
|
usage: 'npx nuxi dev [rootDir] [--clipboard] [--open, -o]',
|
||||||
description: 'Run nuxt development server'
|
description: 'Run nuxt development server'
|
||||||
},
|
},
|
||||||
async invoke (args) {
|
async invoke (args) {
|
@ -9,7 +9,7 @@ import { defineNuxtCommand } from './index'
|
|||||||
export default defineNuxtCommand({
|
export default defineNuxtCommand({
|
||||||
meta: {
|
meta: {
|
||||||
name: 'prepare',
|
name: 'prepare',
|
||||||
usage: 'nu prepare',
|
usage: 'npx nuxi prepare',
|
||||||
description: 'Prepare nuxt for development/build'
|
description: 'Prepare nuxt for development/build'
|
||||||
},
|
},
|
||||||
async invoke (args) {
|
async invoke (args) {
|
@ -4,13 +4,13 @@ import { commands, defineNuxtCommand } from './index'
|
|||||||
export default defineNuxtCommand({
|
export default defineNuxtCommand({
|
||||||
meta: {
|
meta: {
|
||||||
name: 'help',
|
name: 'help',
|
||||||
usage: 'nu help',
|
usage: 'nuxt help',
|
||||||
description: 'Show help'
|
description: 'Show help'
|
||||||
},
|
},
|
||||||
invoke (_args) {
|
invoke (_args) {
|
||||||
const sections: string[] = []
|
const sections: string[] = []
|
||||||
|
|
||||||
sections.push(`Usage: ${cyan(`nu ${Object.keys(commands).join('|')} [args]`)}`)
|
sections.push(`Usage: ${cyan(`npx nuxi ${Object.keys(commands).join('|')} [args]`)}`)
|
||||||
|
|
||||||
console.log(sections.join('\n\n') + '\n')
|
console.log(sections.join('\n\n') + '\n')
|
||||||
}
|
}
|
@ -24,7 +24,7 @@ async function _main () {
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (command === 'usage') {
|
if (command === 'usage') {
|
||||||
console.log(`\nUsage: ${cyan(`nu ${Object.keys(commands).join('|')} [args]`)}\n`)
|
console.log(`\nUsage: ${cyan(`npx nuxi ${Object.keys(commands).join('|')} [args]`)}\n`)
|
||||||
process.exit(1)
|
process.exit(1)
|
||||||
}
|
}
|
||||||
|
|
@ -10,7 +10,7 @@ export function showHelp (meta?) {
|
|||||||
sections.push(magenta('⋮ ') + meta.description)
|
sections.push(magenta('⋮ ') + meta.description)
|
||||||
}
|
}
|
||||||
|
|
||||||
sections.push(`Use ${cyan('nu [command] --help')} to see help for each command`)
|
sections.push(`Use ${cyan('npx nuxi [command] --help')} to see help for each command`)
|
||||||
|
|
||||||
console.log(sections.join('\n\n') + '\n')
|
console.log(sections.join('\n\n') + '\n')
|
||||||
}
|
}
|
2
packages/nuxt3/bin/nuxi.js
Executable file
2
packages/nuxt3/bin/nuxi.js
Executable file
@ -0,0 +1,2 @@
|
|||||||
|
#!/usr/bin/env node
|
||||||
|
require('nuxi/bin/nuxi')
|
@ -1,2 +0,0 @@
|
|||||||
#!/usr/bin/env node
|
|
||||||
require('nuxt-cli/bin/nuxt')
|
|
@ -9,6 +9,6 @@ export default defineBuildConfig({
|
|||||||
'@nuxt/app',
|
'@nuxt/app',
|
||||||
'@nuxt/vite-builder',
|
'@nuxt/vite-builder',
|
||||||
'@nuxt/webpack-builder',
|
'@nuxt/webpack-builder',
|
||||||
'nuxt-cli'
|
'nuxi'
|
||||||
]
|
]
|
||||||
})
|
})
|
||||||
|
@ -5,9 +5,9 @@
|
|||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
"main": "./dist/index.js",
|
"main": "./dist/index.js",
|
||||||
"bin": {
|
"bin": {
|
||||||
"nu": "./bin/nuxt.js",
|
"nu": "./bin/nuxi.js",
|
||||||
"nuxt": "./bin/nuxt.js",
|
"nuxi": "./bin/nuxi.js",
|
||||||
"nuxt-cli": "./bin/nuxt.js"
|
"nuxt": "./bin/nuxi.js"
|
||||||
},
|
},
|
||||||
"files": [
|
"files": [
|
||||||
"bin",
|
"bin",
|
||||||
@ -37,7 +37,7 @@
|
|||||||
"hookable": "^4.4.1",
|
"hookable": "^4.4.1",
|
||||||
"ignore": "^5.1.8",
|
"ignore": "^5.1.8",
|
||||||
"lodash": "^4.17.21",
|
"lodash": "^4.17.21",
|
||||||
"nuxt-cli": "^0.3.8",
|
"nuxi": "^0.3.8",
|
||||||
"scule": "^0.2.1",
|
"scule": "^0.2.1",
|
||||||
"ufo": "^0.7.7",
|
"ufo": "^0.7.7",
|
||||||
"upath": "^2.0.1",
|
"upath": "^2.0.1",
|
||||||
|
@ -5,8 +5,8 @@
|
|||||||
"nuxt3": "latest"
|
"nuxt3": "latest"
|
||||||
},
|
},
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"dev": "nu dev",
|
"dev": "nuxt dev",
|
||||||
"build": "nu build",
|
"build": "nuxt build",
|
||||||
"start": "node .output/server/index.mjs"
|
"start": "node .output/server/index.mjs"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -1,2 +1,2 @@
|
|||||||
#!/usr/bin/env node
|
#!/usr/bin/env node
|
||||||
require('../packages/cli/bin/nuxt')
|
require('../packages/nuxi/bin/nuxi')
|
||||||
|
2
test/fixtures/compat/yarn.lock
vendored
2
test/fixtures/compat/yarn.lock
vendored
@ -1321,7 +1321,7 @@ __metadata:
|
|||||||
upath: ^2.0.1
|
upath: ^2.0.1
|
||||||
wrap-ansi: ^7.0.0
|
wrap-ansi: ^7.0.0
|
||||||
bin:
|
bin:
|
||||||
nuxt-cli: bin/nuxt-cli.js
|
nuxi: bin/nuxi.js
|
||||||
checksum: 0ce9114dd4887d629afe35712bd90e83092715453db53f3704f561a2e888b423cd60c25ef72a409c37f27d1c8ec242bc971ea7c4fc7c286246771fdfb5bea0b5
|
checksum: 0ce9114dd4887d629afe35712bd90e83092715453db53f3704f561a2e888b423cd60c25ef72a409c37f27d1c8ec242bc971ea7c4fc7c286246771fdfb5bea0b5
|
||||||
languageName: node
|
languageName: node
|
||||||
linkType: hard
|
linkType: hard
|
||||||
|
@ -27,7 +27,7 @@ export function setupTest (preset) {
|
|||||||
it('nitro build', async () => {
|
it('nitro build', async () => {
|
||||||
const nuxtCLI = isCompat
|
const nuxtCLI = isCompat
|
||||||
? resolve(ctx.rootDir, 'node_modules/nuxt/bin/nuxt.js')
|
? resolve(ctx.rootDir, 'node_modules/nuxt/bin/nuxt.js')
|
||||||
: resolveWorkspace('packages/cli/bin/nuxt.js')
|
: resolveWorkspace('packages/nuxi/bin/nuxi.js')
|
||||||
|
|
||||||
await execa('node', [nuxtCLI, 'build', ctx.rootDir], {
|
await execa('node', [nuxtCLI, 'build', ctx.rootDir], {
|
||||||
env: {
|
env: {
|
||||||
|
@ -17,7 +17,7 @@ export function fixtureDir (name) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
export async function execNuxtCLI (args, opts) {
|
export async function execNuxtCLI (args, opts) {
|
||||||
const nuxtCLI = resolveWorkspace('packages/cli/bin/nuxt.js')
|
const nuxtCLI = resolveWorkspace('packages/nuxi/bin/nuxi.js')
|
||||||
await execa('node', [nuxtCLI, ...args], opts)
|
await execa('node', [nuxtCLI, ...args], opts)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
18
yarn.lock
18
yarn.lock
@ -8691,9 +8691,9 @@ fsevents@~2.3.2:
|
|||||||
languageName: node
|
languageName: node
|
||||||
linkType: hard
|
linkType: hard
|
||||||
|
|
||||||
"nuxt-cli@^0.3.8, nuxt-cli@workspace:packages/cli":
|
"nuxi@^0.3.8, nuxi@workspace:packages/nuxi":
|
||||||
version: 0.0.0-use.local
|
version: 0.0.0-use.local
|
||||||
resolution: "nuxt-cli@workspace:packages/cli"
|
resolution: "nuxi@workspace:packages/nuxi"
|
||||||
dependencies:
|
dependencies:
|
||||||
"@nuxt/design": 0.0.5
|
"@nuxt/design": 0.0.5
|
||||||
"@nuxt/kit": ^0.6.4
|
"@nuxt/kit": ^0.6.4
|
||||||
@ -8716,9 +8716,9 @@ fsevents@~2.3.2:
|
|||||||
fsevents:
|
fsevents:
|
||||||
optional: true
|
optional: true
|
||||||
bin:
|
bin:
|
||||||
nu: ./bin/nuxt.js
|
nu: ./bin/nuxi.js
|
||||||
nuxt: ./bin/nuxt.js
|
nuxi: ./bin/nuxi.js
|
||||||
nuxt-cli: ./bin/nuxt.js
|
nuxt: ./bin/nuxi.js
|
||||||
languageName: unknown
|
languageName: unknown
|
||||||
linkType: soft
|
linkType: soft
|
||||||
|
|
||||||
@ -8785,16 +8785,16 @@ fsevents@~2.3.2:
|
|||||||
hookable: ^4.4.1
|
hookable: ^4.4.1
|
||||||
ignore: ^5.1.8
|
ignore: ^5.1.8
|
||||||
lodash: ^4.17.21
|
lodash: ^4.17.21
|
||||||
nuxt-cli: ^0.3.8
|
nuxi: ^0.3.8
|
||||||
scule: ^0.2.1
|
scule: ^0.2.1
|
||||||
ufo: ^0.7.7
|
ufo: ^0.7.7
|
||||||
unbuild: ^0.4.2
|
unbuild: ^0.4.2
|
||||||
upath: ^2.0.1
|
upath: ^2.0.1
|
||||||
vue: 3.2.1
|
vue: 3.2.1
|
||||||
bin:
|
bin:
|
||||||
nu: ./bin/nuxt.js
|
nu: ./bin/nuxi.js
|
||||||
nuxt: ./bin/nuxt.js
|
nuxi: ./bin/nuxi.js
|
||||||
nuxt-cli: ./bin/nuxt.js
|
nuxt: ./bin/nuxi.js
|
||||||
languageName: unknown
|
languageName: unknown
|
||||||
linkType: soft
|
linkType: soft
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user