Skip to content

Commit

Permalink
refactor!: rename nuxt3 to nuxt (nuxt#4449)
Browse files Browse the repository at this point in the history
  • Loading branch information
pi0 authored Apr 20, 2022
1 parent 896d140 commit 4712e99
Show file tree
Hide file tree
Showing 164 changed files with 130 additions and 132 deletions.
8 changes: 4 additions & 4 deletions .eslintrc
Original file line number Diff line number Diff line change
Expand Up @@ -27,13 +27,13 @@
{
"zones": [
{
"from": "packages/nuxt3/src/!(core)/**/*",
"target": "packages/nuxt3/src/core",
"from": "packages/nuxt/src/!(core)/**/*",
"target": "packages/nuxt/src/core",
"message": "core should not directly import from modules."
},
{
"from": "packages/nuxt3/src/!(app)/**/*",
"target": "packages/nuxt3/src/app",
"from": "packages/nuxt/src/!(app)/**/*",
"target": "packages/nuxt/src/app",
"message": "app should not directly import from modules."
},
{
Expand Down
8 changes: 4 additions & 4 deletions docs/content/1.getting-started/1.quick-start.md
Original file line number Diff line number Diff line change
Expand Up @@ -42,19 +42,19 @@ Open a terminal, or from [Visual Studio Code](https://code.visualstudio.com/), o
::code-group

```bash [npx]
npx nuxi init nuxt3-app
npx nuxi init nuxt-app
```

```bash [pnpm]
pnpm dlx nuxi init nuxt3-app
pnpm dlx nuxi init nuxt-app
```

::

Open `nuxt3-app` folder in visual studio code:
Open `nuxt-app` folder in visual studio code:

```bash
code nuxt3-app
code nuxt-app
```

Install the dependencies:
Expand Down
2 changes: 1 addition & 1 deletion docs/content/2.guide/1.concepts/1.introduction.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ On top of this setup, Nuxt provides a [directory structure](/guide/directory-str
Nuxt is composed of different [core packages](https://github.com/nuxt/framework/tree/main/packages):
::list{type=info}

- Core Engine: [nuxt3](https://github.com/nuxt/framework/tree/main/packages/nuxt3)
- Core Engine: [nuxt](https://github.com/nuxt/framework/tree/main/packages/nuxt)
- Bundlers: [@nuxt/vite-builder](https://github.com/nuxt/framework/tree/main/packages/vite) and [@nuxt/webpack-builder](https://github.com/nuxt/framework/tree/main/packages/webpack)
- Command line interface: [nuxi](https://github.com/nuxt/framework/tree/main/packages/nuxi)
- Server engine: [nitro](https://github.com/unjs/nitro)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ head.title: Nuxt configuration file
Nuxt can be easily configured with a single `nuxt.config` file, which can have either a `.js`, `.ts` or `.mjs` extension.

```ts
import { defineNuxtConfig } from 'nuxt3'
import { defineNuxtConfig } from 'nuxt'

export default defineNuxtConfig({
// My Nuxt config
Expand Down
4 changes: 2 additions & 2 deletions docs/content/2.guide/3.directory-structure/4.components.md
Original file line number Diff line number Diff line change
Expand Up @@ -66,8 +66,8 @@ const MyButton = resolveComponent('MyButton')
Alternatively, though not recommended, you can register all your components globally, which will create async chunks for all your components and make them available throughout your application.

```diff
import { defineNuxtConfig } from 'nuxt3'
import { defineNuxtConfig } from 'nuxt'

export default defineNuxtConfig({
components: {
+ global: true,
Expand Down
6 changes: 3 additions & 3 deletions docs/content/2.guide/6.going-further/1.internals.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ Therefore only one instance of Nuxt is allowed to run per process.

To extend the Nuxt interface and hook into different stages of the build process, we can use [Nuxt Modules](/guide/going-further/modules).

For more details, check out [the source code](https://github.com/nuxt/framework/blob/main/packages/nuxt3/src/core/nuxt.ts).
For more details, check out [the source code](https://github.com/nuxt/framework/blob/main/packages/nuxt/src/core/nuxt.ts).

## The NuxtApp interface

Expand All @@ -38,7 +38,7 @@ const nuxtApp = {
vueApp, // the global Vue application: https://vuejs.org/api/application.html#application-api

// These let you call and add runtime NuxtApp hooks
// https://github.com/nuxt/framework/blob/main/packages/nuxt3/src/app/nuxt.ts#L18
// https://github.com/nuxt/framework/blob/main/packages/nuxt/src/app/nuxt.ts#L18
hooks,
hook,
callHook,
Expand All @@ -63,7 +63,7 @@ const nuxtApp = {
}
```

For more details, check out [the source code](https://github.com/nuxt/framework/blob/main/packages/nuxt3/src/app/nuxt.ts).
For more details, check out [the source code](https://github.com/nuxt/framework/blob/main/packages/nuxt/src/app/nuxt.ts).

## Runtime Context vs. Build Context

Expand Down
4 changes: 2 additions & 2 deletions docs/content/2.guide/6.going-further/5.esm.md
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,7 @@ If you encounter these errors, the issue is almost certainly with the upstream l
In the meantime, you can tell Nuxt not to try to import these libraries by adding them to `build.transpile`:
```js
import { defineNuxtConfig } from 'nuxt3'
import { defineNuxtConfig } from 'nuxt'
export default defineNuxtConfig({
build: {
Expand All @@ -133,7 +133,7 @@ You may find that you _also_ need to add other packages that are being imported
In some cases, you may also need to manually alias the library to the CJS version, for example:
```js
import { defineNuxtConfig } from 'nuxt3'
import { defineNuxtConfig } from 'nuxt'
export default defineNuxtConfig({
alias: {
Expand Down
2 changes: 1 addition & 1 deletion docs/content/2.guide/6.going-further/7.testing.md
Original file line number Diff line number Diff line change
Expand Up @@ -148,7 +148,7 @@ To test the modules we create, we could set up some Nuxt apps as fixtures and te

```ts
// nuxt.config.js
import { defineNuxtConfig } from 'nuxt3'
import { defineNuxtConfig } from 'nuxt'
import MyModule from '../../src'

export default defineNuxtConfig({
Expand Down
2 changes: 1 addition & 1 deletion docs/content/3.api/4.advanced/1.hooks.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@

# App Hooks (runtime)

Check the [app source code](https://github.com/nuxt/framework/blob/main/packages/nuxt3/src/app/nuxt.ts#L18) for all available hooks.
Check the [app source code](https://github.com/nuxt/framework/blob/main/packages/nuxt/src/app/nuxt.ts#L18) for all available hooks.

Hook | Arguments | Description
-----------------------|-------------------|---------------
Expand Down
4 changes: 2 additions & 2 deletions docs/content/migration/2.configuration.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ Nuxt configuration will be loaded using [`unjs/jiti`](https://github.com/unjs/ji
```

```ts [Nuxt 3]
import { defineNuxtConfig } from 'nuxt3'
import { defineNuxtConfig } from 'nuxt'

export default defineNuxtConfig({
// ...
Expand All @@ -50,7 +50,7 @@ Nuxt configuration will be loaded using [`unjs/jiti`](https://github.com/unjs/ji
```

```ts [Nuxt 3]
import { defineNuxtConfig } from 'nuxt3'
import { defineNuxtConfig } from 'nuxt'

export default defineNuxtConfig({
hooks: {
Expand Down
2 changes: 1 addition & 1 deletion docs/content/migration/8.runtime-config.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ When referencing these variables within your components, you will have to use th
::code-group

```ts [nuxt.config.ts]
import { defineNuxtConfig } from 'nuxt3'
import { defineNuxtConfig } from 'nuxt'

export default defineNuxtConfig({
runtimeConfig: {
Expand Down
2 changes: 1 addition & 1 deletion examples/advanced/config-extends/base/nuxt.config.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { defineNuxtConfig } from 'nuxt3'
import { defineNuxtConfig } from 'nuxt'

export default defineNuxtConfig({
autoImports: {
Expand Down
2 changes: 1 addition & 1 deletion examples/advanced/config-extends/nuxt.config.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { defineNuxtConfig } from 'nuxt3'
import { defineNuxtConfig } from 'nuxt'

export default defineNuxtConfig({
extends: [
Expand Down
2 changes: 1 addition & 1 deletion examples/advanced/config-extends/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"private": true,
"devDependencies": {
"@nuxt/ui": "^0.1.0",
"nuxt3": "latest"
"nuxt": "npm:nuxt3@latest"
},
"scripts": {
"dev": "nuxi dev",
Expand Down
2 changes: 1 addition & 1 deletion examples/advanced/config-extends/ui/nuxt.config.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { defineNuxtConfig } from 'nuxt3'
import { defineNuxtConfig } from 'nuxt'

export default defineNuxtConfig({
components: [
Expand Down
2 changes: 1 addition & 1 deletion examples/advanced/module-extend-pages/nuxt.config.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { defineNuxtConfig } from 'nuxt3'
import { defineNuxtConfig } from 'nuxt'

export default defineNuxtConfig({
modules: [
Expand Down
2 changes: 1 addition & 1 deletion examples/advanced/module-extend-pages/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,6 @@
},
"devDependencies": {
"@nuxt/ui": "^0.1.0",
"nuxt3": "latest"
"nuxt": "npm:nuxt3@latest"
}
}
2 changes: 1 addition & 1 deletion examples/advanced/testing/nuxt.config.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { defineNuxtConfig } from 'nuxt3'
import { defineNuxtConfig } from 'nuxt'

export default defineNuxtConfig({
})
2 changes: 1 addition & 1 deletion examples/advanced/testing/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,6 @@
"start": "nuxi preview"
},
"devDependencies": {
"nuxt3": "latest"
"nuxt": "npm:nuxt3@latest"
}
}
2 changes: 1 addition & 1 deletion examples/app/error-handling/nuxt.config.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { defineNuxtConfig } from 'nuxt3'
import { defineNuxtConfig } from 'nuxt'

export default defineNuxtConfig({
modules: [
Expand Down
2 changes: 1 addition & 1 deletion examples/app/error-handling/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,6 @@
},
"devDependencies": {
"@nuxt/ui": "^0.1.0",
"nuxt3": "latest"
"nuxt": "npm:nuxt3@latest"
}
}
2 changes: 1 addition & 1 deletion examples/app/plugins/nuxt.config.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { defineNuxtConfig } from 'nuxt3'
import { defineNuxtConfig } from 'nuxt'

export default defineNuxtConfig({
modules: [
Expand Down
2 changes: 1 addition & 1 deletion examples/app/plugins/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,6 @@
},
"devDependencies": {
"@nuxt/ui": "^0.1.0",
"nuxt3": "latest"
"nuxt": "npm:nuxt3@latest"
}
}
2 changes: 1 addition & 1 deletion examples/app/teleport/nuxt.config.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { defineNuxtConfig } from 'nuxt3'
import { defineNuxtConfig } from 'nuxt'

export default defineNuxtConfig({
modules: [
Expand Down
2 changes: 1 addition & 1 deletion examples/app/teleport/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,6 @@
},
"devDependencies": {
"@nuxt/ui": "^0.1.0",
"nuxt3": "latest"
"nuxt": "npm:nuxt3@latest"
}
}
2 changes: 1 addition & 1 deletion examples/auto-imports/components/nuxt.config.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { defineNuxtConfig } from 'nuxt3'
import { defineNuxtConfig } from 'nuxt'

export default defineNuxtConfig({
modules: [
Expand Down
2 changes: 1 addition & 1 deletion examples/auto-imports/components/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,6 @@
},
"devDependencies": {
"@nuxt/ui": "^0.1.0",
"nuxt3": "latest"
"nuxt": "npm:nuxt3@latest"
}
}
2 changes: 1 addition & 1 deletion examples/auto-imports/composables/nuxt.config.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { defineNuxtConfig } from 'nuxt3'
import { defineNuxtConfig } from 'nuxt'

export default defineNuxtConfig({
modules: [
Expand Down
2 changes: 1 addition & 1 deletion examples/auto-imports/composables/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,6 @@
},
"devDependencies": {
"@nuxt/ui": "^0.1.0",
"nuxt3": "latest"
"nuxt": "npm:nuxt3@latest"
}
}
2 changes: 1 addition & 1 deletion examples/composables/use-async-data/nuxt.config.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { defineNuxtConfig } from 'nuxt3'
import { defineNuxtConfig } from 'nuxt'

export default defineNuxtConfig({
modules: [
Expand Down
2 changes: 1 addition & 1 deletion examples/composables/use-async-data/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,6 @@
},
"devDependencies": {
"@nuxt/ui": "^0.1.0",
"nuxt3": "latest"
"nuxt": "npm:nuxt3@latest"
}
}
2 changes: 1 addition & 1 deletion examples/composables/use-cookie/nuxt.config.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { defineNuxtConfig } from 'nuxt3'
import { defineNuxtConfig } from 'nuxt'

export default defineNuxtConfig({
modules: [
Expand Down
2 changes: 1 addition & 1 deletion examples/composables/use-cookie/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,6 @@
},
"devDependencies": {
"@nuxt/ui": "^0.1.0",
"nuxt3": "latest"
"nuxt": "npm:nuxt3@latest"
}
}
2 changes: 1 addition & 1 deletion examples/composables/use-fetch/nuxt.config.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { defineNuxtConfig } from 'nuxt3'
import { defineNuxtConfig } from 'nuxt'

export default defineNuxtConfig({
modules: [
Expand Down
2 changes: 1 addition & 1 deletion examples/composables/use-fetch/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,6 @@
},
"devDependencies": {
"@nuxt/ui": "^0.1.0",
"nuxt3": "latest"
"nuxt": "npm:nuxt3@latest"
}
}
2 changes: 1 addition & 1 deletion examples/composables/use-head/nuxt.config.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { defineNuxtConfig } from 'nuxt3'
import { defineNuxtConfig } from 'nuxt'

export default defineNuxtConfig({
modules: [
Expand Down
2 changes: 1 addition & 1 deletion examples/composables/use-head/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,6 @@
},
"devDependencies": {
"@nuxt/ui": "^0.1.0",
"nuxt3": "latest"
"nuxt": "npm:nuxt3@latest"
}
}
2 changes: 1 addition & 1 deletion examples/composables/use-state/nuxt.config.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { defineNuxtConfig } from 'nuxt3'
import { defineNuxtConfig } from 'nuxt'

export default defineNuxtConfig({
modules: [
Expand Down
2 changes: 1 addition & 1 deletion examples/composables/use-state/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,6 @@
},
"devDependencies": {
"@nuxt/ui": "^0.1.0",
"nuxt3": "latest"
"nuxt": "npm:nuxt3@latest"
}
}
2 changes: 1 addition & 1 deletion examples/essentials/hello-world/nuxt.config.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { defineNuxtConfig } from 'nuxt3'
import { defineNuxtConfig } from 'nuxt'

export default defineNuxtConfig({
})
2 changes: 1 addition & 1 deletion examples/essentials/hello-world/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,6 @@
"start": "nuxi preview"
},
"devDependencies": {
"nuxt3": "latest"
"nuxt": "npm:nuxt3@latest"
}
}
2 changes: 1 addition & 1 deletion examples/experimental/reactivity-transform/nuxt.config.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { defineNuxtConfig } from 'nuxt3'
import { defineNuxtConfig } from 'nuxt'

export default defineNuxtConfig({
modules: [
Expand Down
2 changes: 1 addition & 1 deletion examples/experimental/reactivity-transform/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,6 @@
},
"devDependencies": {
"@nuxt/ui": "^0.1.0",
"nuxt3": "latest"
"nuxt": "npm:nuxt3@latest"
}
}
2 changes: 1 addition & 1 deletion examples/experimental/vite-node/nuxt.config.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { defineNuxtConfig } from 'nuxt3'
import { defineNuxtConfig } from 'nuxt'

export default defineNuxtConfig({
modules: [
Expand Down
2 changes: 1 addition & 1 deletion examples/experimental/vite-node/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,6 @@
},
"devDependencies": {
"@nuxt/ui": "^0.1.0",
"nuxt3": "latest"
"nuxt": "npm:nuxt3@latest"
}
}
Loading

0 comments on commit 4712e99

Please sign in to comment.