Skip to content

Commit

Permalink
docs: typo
Browse files Browse the repository at this point in the history
  • Loading branch information
antfu authored and Dev1436 committed Aug 12, 2023
1 parent 13fd898 commit 77c3057
Show file tree
Hide file tree
Showing 12 changed files with 29 additions and 29 deletions.
2 changes: 1 addition & 1 deletion docs/.studio/app.config.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
"github": "nuxt/devtools"
},
"header": {
"title": "Nuxt Devtools",
"title": "Nuxt DevTools",
"logo": true
}
}
Expand Down
2 changes: 1 addition & 1 deletion docs/content/2.module/0.guide.md
Original file line number Diff line number Diff line change
Expand Up @@ -182,7 +182,7 @@ Please refer to [Trying Local Changes](/development/contributing#trying-local-ch

## Examples

Here are a few examples of how to integrate Nuxt Devtools in modules:
Here are a few examples of how to integrate Nuxt DevTools in modules:

- [Built-in VS Code integration with lazy initialize](https://github.com/nuxt/devtools/blob/main/packages/devtools/src/integrations/vscode.ts)
- [VueUse adds a docs tab](https://github.com/vueuse/vueuse/blob/ce28cef154489c73abe308104bef8568594a9bcd/packages/nuxt/index.ts#L89-L99)
Expand Down
4 changes: 2 additions & 2 deletions docs/content/3.development/0.contributing.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ Nuxt DevTools uses pnpm v7. If you are working on multiple projects with differe
This repo contains the following packages:

- `@nuxt/devtools`: The Nuxt DevTools module
- `@nuxt/devtools-ui-kit`: The UI Kit used by Nuxt DevTools and also for module authors to build UI for Devtools interation
- `@nuxt/devtools-ui-kit`: The UI Kit used by Nuxt DevTools and also for module authors to build UI for DevTools interation

### DevTools

Expand All @@ -39,7 +39,7 @@ Normally when you are developing the Nuxt DevTools, the components in the UI Kit
If you want to try your local changes in other Nuxt projects, you can use the `local.ts` module under the root folder.

Change `@nuxt/devtools` to the absolute path of this module in any of your Nuxt projects,
allows you to try Nuxt Devtools locally directly from the source code. HMR is supported
allows you to try Nuxt DevTools locally directly from the source code. HMR is supported
for the front-end client.

For example, if you clone this repo to `/users/me/nuxt-devtools`, update your `nuxt.config.ts`:
Expand Down
6 changes: 3 additions & 3 deletions local.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
* Local development module entry
*
* Change `@nuxt/devtools` to the absolute path of this module in any of your Nuxt projects,
* allows you to try Nuxt Devtools locally directly from the source code. HMR is supported
* allows you to try Nuxt DevTools locally directly from the source code. HMR is supported
* for the front-end client.
*
* For example, if you clone this repo to `/users/me/nuxt-devtools`, update your nuxt config:
Expand Down Expand Up @@ -70,14 +70,14 @@ export default defineNuxtModule<ModuleOptions>({
},
{
id: 'devtools:local',
name: 'Nuxt Devtools Local',
name: 'Nuxt DevTools Local',
icon: 'logos-nuxt-icon',
},
nuxt,
)
})

logger.info(`Nuxt Devtools is using local client from \`${clientDir}\``)
logger.info(`Nuxt DevTools is using local client from \`${clientDir}\``)

return enableModule(options, nuxt)
},
Expand Down
2 changes: 1 addition & 1 deletion packages/devtools-ui-kit/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,6 @@

> **Warning**: This library is heavily working in progress. Breaking changes may not follow semver. Pin the version if used.
UI kit for module authors to build embedded views for Nuxt Devtools.
UI kit for module authors to build embedded views for Nuxt DevTools.

Please refer to the [DevTools UI Kit](https://devtools.nuxtjs.org/module/ui-kit) for the full documentation.
8 changes: 4 additions & 4 deletions packages/devtools-wizard/src/builtin.ts
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ function findNuxtConfig(cwd: string) {
}

function printOutManual(value: boolean) {
consola.info(c.yellow('To manually enable Nuxt Devtools, add the following to your Nuxt config:'))
consola.info(c.yellow('To manually enable Nuxt DevTools, add the following to your Nuxt config:'))
consola.info(c.cyan(`\n devtools: { enabled: ${value} }\n`))
}

Expand Down Expand Up @@ -51,7 +51,7 @@ async function toggleConfig(cwd: string, value?: boolean) {
const generated = mod.generate().code

if (source.trim() === generated.trim()) {
consola.info(c.yellow(`Nuxt Devtools is already ${value ? 'enabled' : 'disabled'}`))
consola.info(c.yellow(`Nuxt DevTools is already ${value ? 'enabled' : 'disabled'}`))
}
else {
consola.log('')
Expand Down Expand Up @@ -88,15 +88,15 @@ export async function enable(cwd: string) {
if (await toggleConfig(cwd, true)) {
// disable global devtools
await import('./global').then(r => r.disableSilently(cwd))
consola.success(c.green('Nuxt Devtools is enabled! Restart your Nuxt app to start using it.'))
consola.success(c.green('Nuxt DevTools is enabled! Restart your Nuxt app to start using it.'))
}
}

export async function disable(cwd: string) {
if (await toggleConfig(cwd, false)) {
// disable global devtools
await import('./global').then(r => r.disableSilently(cwd))
consola.success('Nuxt Devtools disabled for this project.')
consola.success('Nuxt DevTools disabled for this project.')
}
}

Expand Down
16 changes: 8 additions & 8 deletions packages/devtools-wizard/src/global.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/**
* This module is for installing Nuxt Devtools globally and enabling it for a project.
* This module is for installing Nuxt DevTools globally and enabling it for a project.
*
* Since Nuxt v3.4, Nuxt Devtools is shipped with Nuxt so we only using this for Nuxt below v3.4.
* Since Nuxt v3.4, Nuxt DevTools is shipped with Nuxt so we only using this for Nuxt below v3.4.
*/
import fs from 'node:fs'
import { readUser, writeUser } from 'rc9'
Expand All @@ -18,19 +18,19 @@ const pathRegex = /[\\\/]@nuxt[\\\/]devtools[\\\/]/

export async function enable(cwd: string) {
const rc = readUser(RC_PATH)
consola.info('Installed Nuxt Devtools...')
consola.info('Installed Nuxt DevTools...')
await execa('npm', ['install', '-g', `${moduleName}@latest`], { stdio: 'inherit' })

markEnable(rc, cwd)
consola.info('Nuxt Devtools enabled! Restart your Nuxt app to start using it.')
consola.info('Nuxt DevTools enabled! Restart your Nuxt app to start using it.')
}

function markEnable(rc: RC, path: string) {
const modulePath = resolve(globalDirs.npm.packages, moduleName)
const targetPath = resolve(modulePath, 'module.cjs').replace(/\\/g, '/')

if (!fs.existsSync(targetPath))
throw new Error('Failed to locate the global Nuxt Devtools module. You may try it again')
throw new Error('Failed to locate the global Nuxt DevTools module. You may try it again')

// remove all entries
removeModule(rc)
Expand Down Expand Up @@ -59,13 +59,13 @@ export async function disable(cwd: string, args: string[]) {
const isRemove = args.includes('--remove')

if (markDisable(rc, cwd))
consola.success('Nuxt Devtools disabled for this project.')
consola.success('Nuxt DevTools disabled for this project.')
else if (!isRemove)
consola.warn('Nuxt Devtools is not enabled for this project.')
consola.warn('Nuxt DevTools is not enabled for this project.')

if (isRemove) {
removeModule(rc)
consola.success('Nuxt Devtools is removed globally')
consola.success('Nuxt DevTools is removed globally')
}

writeUser(rc, RC_PATH)
Expand Down
8 changes: 4 additions & 4 deletions packages/devtools-wizard/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -24,11 +24,11 @@ async function run() {

consola.log('')
consola.log(c.bold(c.green(' Nuxt ')))
consola.log(`${c.inverse(c.bold(c.green(' Devtools ')))} ${c.green(`v${version}`)} ${c.yellow('(experimental)')}`)
consola.log(`${c.inverse(c.bold(c.green(' DevTools ')))} ${c.green(`v${version}`)} ${c.yellow('(experimental)')}`)
consola.log(`\n${c.gray('Learn more at https://devtools.nuxtjs.org\n')}`)

if (moduleName.endsWith('-edge'))
throw new Error('Edge release of Nuxt Devtools requires to be installed locally. Learn more at https://github.com/nuxt/devtools/#edge-release-channel')
throw new Error('Edge release of Nuxt DevTools requires to be installed locally. Learn more at https://github.com/nuxt/devtools/#edge-release-channel')

const nuxtVersion = await getNuxtVersion(cwd)
if (!nuxtVersion) {
Expand All @@ -40,14 +40,14 @@ async function run() {
const isDevToolsBuiltIn = semver.gte(nuxtVersion, '3.4.0')

if (command === 'enable') {
consola.log(c.green('Enabling Nuxt Devtools...'))
consola.log(c.green('Enabling Nuxt DevTools...'))
if (isDevToolsBuiltIn)
await import('./builtin').then(r => r.enable(cwd))
else
await import('./global').then(r => r.enable(cwd))
}
else if (command === 'disable') {
consola.log(c.magenta('Disabling Nuxt Devtools...'))
consola.log(c.magenta('Disabling Nuxt DevTools...'))
if (isDevToolsBuiltIn)
await import('./builtin').then(r => r.disable(cwd))
else
Expand Down
2 changes: 1 addition & 1 deletion packages/devtools/playground/app.vue
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<template>
<div>
[Nuxt Devtools Playground]
[Nuxt DevTools Playground]
</div>
</template>
4 changes: 2 additions & 2 deletions packages/devtools/src/module-main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ export async function enableModule(options: ModuleOptions, nuxt: Nuxt) {
return

if (nuxt.options.builder !== '@nuxt/vite-builder') {
logger.warn('Nuxt Devtools only supports Vite mode, module is disabled.')
logger.warn('Nuxt DevTools only supports Vite mode, module is disabled.')
return
}

Expand Down Expand Up @@ -142,5 +142,5 @@ window.__NUXT_DEVTOOLS_TIME_METRIC__.appInit = Date.now()
isGlobalInstall: isGlobalInstall(),
})

logger.success(`Nuxt Devtools is enabled ${c.dim(`v${version}`)}${isGlobalInstall() ? c.dim('[global]') : ''} ${c.yellow('(experimental)')}`)
logger.success(`Nuxt DevTools is enabled ${c.dim(`v${version}`)}${isGlobalInstall() ? c.dim('[global]') : ''} ${c.yellow('(experimental)')}`)
}
2 changes: 1 addition & 1 deletion packages/devtools/src/runtime/plugins/view/client.ts
Original file line number Diff line number Diff line change
Expand Up @@ -139,7 +139,7 @@ export async function setupDevToolsClient({
else if (retry-- <= 0) {
clearInterval(interval)
// eslint-disable-next-line prefer-promise-reject-errors
reject('Nuxt Devtools client injection failed')
reject('Nuxt DevTools client injection failed')
}
}, timeout)
})
Expand Down
2 changes: 1 addition & 1 deletion playgrounds/module-starter/src/module.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import { setupDevToolsUI } from './devtools'
// Module options TypeScript interface definition
export interface ModuleOptions {
/**
* Enable Nuxt Devtools integration
* Enable Nuxt DevTools integration
*
* @default true
*/
Expand Down

0 comments on commit 77c3057

Please sign in to comment.