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"
|
||||
},
|
||||
"scripts": {
|
||||
"dev": "nu dev",
|
||||
"build": "nu build",
|
||||
"dev": "nuxt dev",
|
||||
"build": "nuxt build",
|
||||
"start": "node .output/server/index.mjs"
|
||||
}
|
||||
}
|
||||
|
@ -5,8 +5,8 @@
|
||||
"nuxt3": "latest"
|
||||
},
|
||||
"scripts": {
|
||||
"dev": "nu dev",
|
||||
"build": "nu build",
|
||||
"dev": "nuxt dev",
|
||||
"build": "nuxt build",
|
||||
"start": "node .output/server/index.mjs"
|
||||
}
|
||||
}
|
||||
|
@ -5,8 +5,8 @@
|
||||
"nuxt3": "latest"
|
||||
},
|
||||
"scripts": {
|
||||
"dev": "nu dev",
|
||||
"build": "nu build",
|
||||
"dev": "nuxt dev",
|
||||
"build": "nuxt build",
|
||||
"start": "node .output/server/index.mjs"
|
||||
}
|
||||
}
|
||||
|
@ -5,8 +5,8 @@
|
||||
"nuxt3": "latest"
|
||||
},
|
||||
"scripts": {
|
||||
"dev": "nu dev",
|
||||
"build": "nu build",
|
||||
"dev": "nuxt dev",
|
||||
"build": "nuxt build",
|
||||
"start": "node .output/server"
|
||||
}
|
||||
}
|
||||
|
@ -5,8 +5,8 @@
|
||||
"nuxt3": "latest"
|
||||
},
|
||||
"scripts": {
|
||||
"dev": "nu dev",
|
||||
"build": "nu build",
|
||||
"dev": "nuxt dev",
|
||||
"build": "nuxt build",
|
||||
"start": "node .output/server/index.mjs"
|
||||
}
|
||||
}
|
||||
|
@ -5,8 +5,8 @@
|
||||
"nuxt3": "latest"
|
||||
},
|
||||
"scripts": {
|
||||
"dev": "nu dev",
|
||||
"build": "nu build",
|
||||
"dev": "nuxt dev",
|
||||
"build": "nuxt build",
|
||||
"start": "node .output/server/index.mjs"
|
||||
}
|
||||
}
|
||||
|
@ -5,8 +5,8 @@
|
||||
"nuxt3": "latest"
|
||||
},
|
||||
"scripts": {
|
||||
"dev": "nu dev",
|
||||
"build": "nu build",
|
||||
"dev": "nuxt dev",
|
||||
"build": "nuxt build",
|
||||
"start": "node .output/server/index.mjs"
|
||||
}
|
||||
}
|
||||
|
@ -5,8 +5,8 @@
|
||||
"nuxt3": "latest"
|
||||
},
|
||||
"scripts": {
|
||||
"dev": "nu dev",
|
||||
"build": "nu build",
|
||||
"dev": "nuxt dev",
|
||||
"build": "nuxt build",
|
||||
"start": "node .output/server/index.mjs"
|
||||
}
|
||||
}
|
||||
|
@ -7,8 +7,8 @@
|
||||
"vue-content-loader": "^2.0.0"
|
||||
},
|
||||
"scripts": {
|
||||
"dev": "nu dev",
|
||||
"build": "nu build",
|
||||
"dev": "nuxt dev",
|
||||
"build": "nuxt build",
|
||||
"start": "node .output/server/index.mjs"
|
||||
}
|
||||
}
|
||||
|
@ -10,9 +10,11 @@
|
||||
"build": "FORCE_COLOR=1 lerna run prepack --stream --no-prefix",
|
||||
"stub": "lerna run prepack -- --stub",
|
||||
"release": "yarn && yarn lint && FORCE_COLOR=1 lerna publish -m \"chore: release\" && yarn stub",
|
||||
"docs": "yarn nu dev docs",
|
||||
"nu": "./node_modules/.bin/nu",
|
||||
"play": "yarn run nu dev playground",
|
||||
"docs": "yarn nuxt dev docs",
|
||||
"nuxi": "./node_modules/.bin/nuxi",
|
||||
"nu": "./node_modules/.bin/nuxi",
|
||||
"nuxt": "./node_modules/.bin/nuxi",
|
||||
"play": "yarn run nuxt dev playground",
|
||||
"example": "yarn workspace example-$0 dev",
|
||||
"example:build": "yarn workspace example-$0 build",
|
||||
"lint": "eslint --ext .vue,.ts,.js .",
|
||||
|
@ -69,7 +69,7 @@ export interface NuxtHooks {
|
||||
'config': (options: NuxtConfig) => 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
|
||||
|
||||
// @nuxt/core
|
||||
|
@ -1,13 +1,13 @@
|
||||
{
|
||||
"name": "nuxt-cli",
|
||||
"name": "nuxi",
|
||||
"version": "0.3.8",
|
||||
"repository": "nuxt/framework",
|
||||
"license": "MIT",
|
||||
"main": "./dist/index.js",
|
||||
"bin": {
|
||||
"nu": "./bin/nuxt.js",
|
||||
"nuxt": "./bin/nuxt.js",
|
||||
"nuxt-cli": "./bin/nuxt.js"
|
||||
"nu": "./bin/nuxi.js",
|
||||
"nuxi": "./bin/nuxi.js",
|
||||
"nuxt": "./bin/nuxi.js"
|
||||
},
|
||||
"scripts": {
|
||||
"prepack": "unbuild"
|
@ -7,7 +7,7 @@ import { defineNuxtCommand } from './index'
|
||||
export default defineNuxtCommand({
|
||||
meta: {
|
||||
name: 'build',
|
||||
usage: 'nu build [rootDir]',
|
||||
usage: 'npx nuxi build [rootDir]',
|
||||
description: 'Build nuxt for production deployment'
|
||||
},
|
||||
async invoke (args) {
|
@ -11,7 +11,7 @@ import { defineNuxtCommand } from './index'
|
||||
export default defineNuxtCommand({
|
||||
meta: {
|
||||
name: 'dev',
|
||||
usage: 'nu dev [rootDir] [--clipboard] [--open, -o]',
|
||||
usage: 'npx nuxi dev [rootDir] [--clipboard] [--open, -o]',
|
||||
description: 'Run nuxt development server'
|
||||
},
|
||||
async invoke (args) {
|
@ -9,7 +9,7 @@ import { defineNuxtCommand } from './index'
|
||||
export default defineNuxtCommand({
|
||||
meta: {
|
||||
name: 'prepare',
|
||||
usage: 'nu prepare',
|
||||
usage: 'npx nuxi prepare',
|
||||
description: 'Prepare nuxt for development/build'
|
||||
},
|
||||
async invoke (args) {
|
@ -4,13 +4,13 @@ import { commands, defineNuxtCommand } from './index'
|
||||
export default defineNuxtCommand({
|
||||
meta: {
|
||||
name: 'help',
|
||||
usage: 'nu help',
|
||||
usage: 'nuxt help',
|
||||
description: 'Show help'
|
||||
},
|
||||
invoke (_args) {
|
||||
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')
|
||||
}
|
@ -24,7 +24,7 @@ async function _main () {
|
||||
}
|
||||
|
||||
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)
|
||||
}
|
||||
|
@ -10,7 +10,7 @@ export function showHelp (meta?) {
|
||||
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')
|
||||
}
|
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/vite-builder',
|
||||
'@nuxt/webpack-builder',
|
||||
'nuxt-cli'
|
||||
'nuxi'
|
||||
]
|
||||
})
|
||||
|
@ -5,9 +5,9 @@
|
||||
"license": "MIT",
|
||||
"main": "./dist/index.js",
|
||||
"bin": {
|
||||
"nu": "./bin/nuxt.js",
|
||||
"nuxt": "./bin/nuxt.js",
|
||||
"nuxt-cli": "./bin/nuxt.js"
|
||||
"nu": "./bin/nuxi.js",
|
||||
"nuxi": "./bin/nuxi.js",
|
||||
"nuxt": "./bin/nuxi.js"
|
||||
},
|
||||
"files": [
|
||||
"bin",
|
||||
@ -37,7 +37,7 @@
|
||||
"hookable": "^4.4.1",
|
||||
"ignore": "^5.1.8",
|
||||
"lodash": "^4.17.21",
|
||||
"nuxt-cli": "^0.3.8",
|
||||
"nuxi": "^0.3.8",
|
||||
"scule": "^0.2.1",
|
||||
"ufo": "^0.7.7",
|
||||
"upath": "^2.0.1",
|
||||
|
@ -5,8 +5,8 @@
|
||||
"nuxt3": "latest"
|
||||
},
|
||||
"scripts": {
|
||||
"dev": "nu dev",
|
||||
"build": "nu build",
|
||||
"dev": "nuxt dev",
|
||||
"build": "nuxt build",
|
||||
"start": "node .output/server/index.mjs"
|
||||
}
|
||||
}
|
||||
|
@ -1,2 +1,2 @@
|
||||
#!/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
|
||||
wrap-ansi: ^7.0.0
|
||||
bin:
|
||||
nuxt-cli: bin/nuxt-cli.js
|
||||
nuxi: bin/nuxi.js
|
||||
checksum: 0ce9114dd4887d629afe35712bd90e83092715453db53f3704f561a2e888b423cd60c25ef72a409c37f27d1c8ec242bc971ea7c4fc7c286246771fdfb5bea0b5
|
||||
languageName: node
|
||||
linkType: hard
|
||||
|
@ -27,7 +27,7 @@ export function setupTest (preset) {
|
||||
it('nitro build', async () => {
|
||||
const nuxtCLI = isCompat
|
||||
? 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], {
|
||||
env: {
|
||||
|
@ -17,7 +17,7 @@ export function fixtureDir (name) {
|
||||
}
|
||||
|
||||
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)
|
||||
}
|
||||
|
||||
|
18
yarn.lock
18
yarn.lock
@ -8691,9 +8691,9 @@ fsevents@~2.3.2:
|
||||
languageName: node
|
||||
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
|
||||
resolution: "nuxt-cli@workspace:packages/cli"
|
||||
resolution: "nuxi@workspace:packages/nuxi"
|
||||
dependencies:
|
||||
"@nuxt/design": 0.0.5
|
||||
"@nuxt/kit": ^0.6.4
|
||||
@ -8716,9 +8716,9 @@ fsevents@~2.3.2:
|
||||
fsevents:
|
||||
optional: true
|
||||
bin:
|
||||
nu: ./bin/nuxt.js
|
||||
nuxt: ./bin/nuxt.js
|
||||
nuxt-cli: ./bin/nuxt.js
|
||||
nu: ./bin/nuxi.js
|
||||
nuxi: ./bin/nuxi.js
|
||||
nuxt: ./bin/nuxi.js
|
||||
languageName: unknown
|
||||
linkType: soft
|
||||
|
||||
@ -8785,16 +8785,16 @@ fsevents@~2.3.2:
|
||||
hookable: ^4.4.1
|
||||
ignore: ^5.1.8
|
||||
lodash: ^4.17.21
|
||||
nuxt-cli: ^0.3.8
|
||||
nuxi: ^0.3.8
|
||||
scule: ^0.2.1
|
||||
ufo: ^0.7.7
|
||||
unbuild: ^0.4.2
|
||||
upath: ^2.0.1
|
||||
vue: 3.2.1
|
||||
bin:
|
||||
nu: ./bin/nuxt.js
|
||||
nuxt: ./bin/nuxt.js
|
||||
nuxt-cli: ./bin/nuxt.js
|
||||
nu: ./bin/nuxi.js
|
||||
nuxi: ./bin/nuxi.js
|
||||
nuxt: ./bin/nuxi.js
|
||||
languageName: unknown
|
||||
linkType: soft
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user