Skip to content
This repository has been archived by the owner on Apr 6, 2023. It is now read-only.

docs(schema): grammar, punctuation and typo fixes #6469

Merged
merged 32 commits into from
Aug 11, 2022
Merged
Show file tree
Hide file tree
Changes from 30 commits
Commits
Show all changes
32 commits
Select commit Hold shift + click to select a range
bcabf62
refactor: remove comma in schema imports
timursaurus Aug 9, 2022
cdf7147
refactor: grammar typos
timursaurus Aug 9, 2022
f140942
refactor: missing periods in schema/compatibility
timursaurus Aug 9, 2022
891285e
refactor: schema/module grammar and typos
timursaurus Aug 9, 2022
7211dc5
refactor: `instead` typo
timursaurus Aug 9, 2022
0470566
Update webpack.ts
timursaurus Aug 9, 2022
3522676
refactor: format
timursaurus Aug 9, 2022
4e3a569
missing period
timursaurus Aug 9, 2022
31c38b3
docs(schema): router typos and backticks
timursaurus Aug 9, 2022
9b477e6
docs(schema/render ): fix typos
timursaurus Aug 9, 2022
e0ef8be
Update nitro.ts
timursaurus Aug 9, 2022
d191166
Update generate.ts
timursaurus Aug 9, 2022
e3dc8e7
Update experimental.ts
timursaurus Aug 9, 2022
3c6d8b2
Update _app.ts
timursaurus Aug 9, 2022
72bb60f
Update _common.ts
timursaurus Aug 9, 2022
837a287
Update build.ts
timursaurus Aug 9, 2022
efab483
Update generate.ts
timursaurus Aug 9, 2022
29770de
refactor: add backticks to /app/
timursaurus Aug 9, 2022
c7a42d5
Update experimental.ts
timursaurus Aug 9, 2022
4400684
Update packages/schema/src/config/_app.ts
timursaurus Aug 10, 2022
d9b395e
Update packages/schema/src/config/_common.ts
timursaurus Aug 10, 2022
c8e55cd
Update packages/schema/src/config/router.ts
timursaurus Aug 10, 2022
b107f28
Update packages/schema/src/config/_app.ts
timursaurus Aug 10, 2022
ac6cafb
Update packages/schema/src/config/webpack.ts
timursaurus Aug 10, 2022
12b35d6
Update router.ts
timursaurus Aug 10, 2022
6914bdc
Update packages/schema/src/config/nitro.ts
timursaurus Aug 10, 2022
33ef65c
Update packages/schema/src/config/render.ts
timursaurus Aug 10, 2022
86167b3
Update packages/schema/src/config/experimental.ts
timursaurus Aug 10, 2022
c611393
Update packages/schema/src/config/render.ts
timursaurus Aug 10, 2022
6877235
Update packages/schema/src/config/_app.ts
timursaurus Aug 10, 2022
4b7375c
Update packages/schema/src/config/webpack.ts
danielroe Aug 10, 2022
4bc8954
Merge branch 'main' into schema-fixes
timursaurus Aug 10, 2022
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
30 changes: 15 additions & 15 deletions packages/schema/src/config/_app.ts
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ export default {
performance: { $resolve: (val, get) => val ?? get('dev') },
},
/**
* Options for the Vue compiler that will be passed at build time
* Options for the Vue compiler that will be passed at build time.
* @see [documentation](https://vuejs.org/api/application.html#app-config-compileroptions)
* @type {typeof import('@vue/compiler-core').CompilerOptions}
* @version 3
Expand Down Expand Up @@ -60,12 +60,12 @@ export default {
/**
* An absolute URL to serve the public folder from (production-only).
*
* This can be set to a different value at runtime by setting the NUXT_APP_CDN_URL environment variable.
* This can be set to a different value at runtime by setting the `NUXT_APP_CDN_URL` environment variable.
* @example
* ```bash
* NUXT_APP_CDN_URL=https://mycdn.org/ node .output/server/index.mjs
* ```
*/
*/
cdnURL: {
$resolve: (val, get) => get('dev') ? '' : (process.env.NUXT_APP_CDN_URL ?? val) || ''
},
Expand Down Expand Up @@ -123,11 +123,11 @@ export default {

return resolved
}
},
}
},
/**
* The path to a templated HTML file for rendering Nuxt responses.
* Uses `<srcDir>/app.html` if it exists or the Nuxt default template if not.
* The path to an HTML template file for rendering Nuxt responses.
* Uses `<srcDir>/app.html` if it exists, or the Nuxt's default template if not.
*
* @example
* ```html
Expand Down Expand Up @@ -156,9 +156,9 @@ export default {
},

/**
* Enable or disable vuex store.
* Enable or disable Vuex store.
*
* By default it is enabled if there is a `store/` directory
* By default, it is enabled if there is a `store/` directory.
* @version 2
*/
store: {
Expand Down Expand Up @@ -263,7 +263,7 @@ export default {
* @example
* ```js
* css: [
* // Load a Node.js module directly (here it's a Sass file)
* // Load a Node.js module directly (here it's a Sass file).
* 'bulma',
* // CSS file in the project
* '@/assets/css/main.css',
Expand All @@ -282,7 +282,7 @@ export default {
/**
* An object where each key name maps to a path to a layout .vue file.
*
* Normally there is no need to configure this directly.
* Normally, there is no need to configure this directly.
* @type {Record<string, string>}
* @version 2
*/
Expand All @@ -291,7 +291,7 @@ export default {
/**
* Set a custom error page layout.
*
* Normally there is no need to configure this directly.
* Normally, there is no need to configure this directly.
* @type {string}
* @version 2
*/
Expand All @@ -304,11 +304,11 @@ export default {
* @version 2
*/
loading: {
/** CSS color of the progress bar */
/** CSS color of the progress bar. */
color: 'black',
/**
* CSS color of the progress bar when an error appended while rendering
* the route (if data or fetch sent back an error for example).
* the route (if data or fetch sent back an error, for example).
*/
failedColor: 'red',
/** Height of the progress bar (used in the style property of the progress bar). */
Expand All @@ -327,7 +327,7 @@ export default {
continuous: false,
/** Set the direction of the progress bar from right to left. */
rtl: false,
/** Set to false to remove default progress bar styles (and add your own). */
/** Set to `false` to remove default progress bar styles (and add your own). */
css: true
},

Expand All @@ -337,7 +337,7 @@ export default {
* Set to `false` to disable. Alternatively, you can pass a string name or an object for more
* configuration. The name can refer to an indicator from [SpinKit](https://tobiasahlin.com/spinkit/)
* or a path to an HTML template of the indicator source code (in this case, all the
* other options will be passed to the template.)
* other options will be passed to the template).
* @version 2
*/
loadingIndicator: {
Expand Down
40 changes: 20 additions & 20 deletions packages/schema/src/config/_common.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import { RuntimeConfig } from '../types/config'

export default {
/**
* Extend nested configurations from multiple local or remote sources
* Extend nested configurations from multiple local or remote sources.
*
* Value should be either a string or array of strings pointing to source directories or config path relative to current config.
*
Expand Down Expand Up @@ -38,7 +38,7 @@ export default {
/**
* Define the source directory of your Nuxt application.
*
* If a relative path is specified it will be relative to the `rootDir`.
* If a relative path is specified, it will be relative to the `rootDir`.
*
* @example
* ```js
Expand Down Expand Up @@ -91,32 +91,32 @@ export default {
/**
* Whether Nuxt is running in development mode.
*
* Normally you should not need to set this.
* Normally, you should not need to set this.
* @version 2
* @version 3
*/
dev: Boolean(isDevelopment),

/**
* Whether your app is being unit tested
* Whether your app is being unit tested.
* @version 2
*/
test: Boolean(isDevelopment),

/**
* Set to true to enable debug mode.
* Set to `true` to enable debug mode.
*
* By default it's only enabled in development mode.
* By default, it's only enabled in development mode.
* @version 2
*/
debug: {
$resolve: (val, get) => val ?? get('dev')
},

/**
* The env property defines environment variables that should be available
* The `env` property defines environment variables that should be available
* throughout your app (server- and client-side). They can be assigned using
* server side environment variables.
* server-side environment variables.
*
* @note Nuxt uses webpack's `definePlugin` to define these environment variables.
* This means that the actual `process` or `process.env` from Node.js is neither
Expand Down Expand Up @@ -185,7 +185,7 @@ export default {
ssr: true,

/**
* @deprecated use ssr option
* @deprecated use `ssr` option
*/
mode: {
$resolve: (val, get) => val || (get('ssr') ? 'spa' : 'universal'),
Expand Down Expand Up @@ -216,7 +216,7 @@ export default {
modern: undefined,

/**
* Modules are Nuxt extensions which can extend its core functionality and add endless integrations
* Modules are Nuxt extensions which can extend its core functionality and add endless integrations.
*
* Each module is either a string (which can refer to a package, or be a path to a file), a
* tuple with the module as first string and the options as a second object, or an inline module function.
Expand Down Expand Up @@ -248,7 +248,7 @@ export default {
/**
* Modules that are only required during development and build time.
*
* Modules are Nuxt extensions which can extend its core functionality and add endless integrations
* Modules are Nuxt extensions which can extend its core functionality and add endless integrations.
*
* Each module is either a string (which can refer to a package, or be a path to a file), a
* tuple with the module as first string and the options as a second object, or an inline module function.
Expand Down Expand Up @@ -283,18 +283,18 @@ export default {
buildModules: [],

/**
* Built-in ad-hoc modules
* Built-in ad-hoc modules.
*
* @private
*/
_modules: [],

/**
* Installed module metadata
* Installed module metadata.
*
* @version 3
* @private
*/
*/
_installedModules: [],

/**
Expand Down Expand Up @@ -333,8 +333,8 @@ export default {
* for an external server.
*
* You can pass a string, which can be the name of a node dependency or a path to a file. You
* can also pass an object with `path` and `handler` keys. (`handler` can be a path or a
* function.)
* can also pass an object with `path` and `handler` keys (`handler` can be a path or a
* function).
*
* @note If you pass a function directly, it will only run in development mode.
*
Expand Down Expand Up @@ -434,15 +434,15 @@ export default {
},

/**
* Customize default directory structure used by nuxt.
* Customize default directory structure used by Nuxt.
*
* It is better to stick with defaults unless needed.
* @version 2
* @version 3
*/
dir: {
/**
* The assets directory (aliased as `~assets` in your build)
* The assets directory (aliased as `~assets` in your build).
* @version 2
*/
assets: 'assets',
Expand Down Expand Up @@ -737,15 +737,15 @@ export default {
* @type {typeof import('../src/types/config').PrivateRuntimeConfig}
* @version 2
* @version 3
* @deprecated Use `runtimeConfig` option
* @deprecated Use `runtimeConfig` option.
*/
privateRuntimeConfig: {},

/**
* @type {typeof import('../src/types/config').PublicRuntimeConfig}
* @version 2
* @version 3
* @deprecated Use `runtimeConfig` option with `public` key (`runtimeConfig.public.*`)
* @deprecated Use `runtimeConfig` option with `public` key (`runtimeConfig.public.*`).
*/
publicRuntimeConfig: {}
}
8 changes: 4 additions & 4 deletions packages/schema/src/config/build.ts
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ export default {
webpack: '@nuxt/webpack-builder',
}
return map[val] || (get('vite') === false ? map.webpack : map.vite)
},
}
},
/**
* Whether to generate sourcemaps.
Expand Down Expand Up @@ -159,15 +159,15 @@ export default {

/**
* Enable caching for [`terser-webpack-plugin`](https://github.com/webpack-contrib/terser-webpack-plugin#options)
* and [`cache-loader`](https://github.com/webpack-contrib/cache-loader#cache-loader)
* and [`cache-loader`](https://github.com/webpack-contrib/cache-loader#cache-loader).
*
* @warning This is an unstable feature.
* @version 2
*/
cache: false,

/**
* Inline server bundle dependencies
* Inline server bundle dependencies.
*
* This mode bundles `node_modules` that are normally preserved as externals in the server build.
*
Expand Down Expand Up @@ -618,7 +618,7 @@ export default {
]
},
/**
* Set to `false` to disable the overlay provided by [FriendlyErrorsWebpackPlugin](https://github.com/nuxt/friendly-errors-webpack-plugin)
* Set to `false` to disable the overlay provided by [FriendlyErrorsWebpackPlugin](https://github.com/nuxt/friendly-errors-webpack-plugin).
* @version 2
*/
friendlyErrors: true,
Expand Down
12 changes: 6 additions & 6 deletions packages/schema/src/config/experimental.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,35 +9,35 @@ export default {
},

/**
* Use vite-node for on-demand server chunk loading
* Use `vite-node` for on-demand server chunk loading.
*/
viteNode: process.env.EXPERIMENTAL_VITE_NODE ? true : false,

/**
* Enable Vue's reactivity transform
* Enable Vue's reactivity transform.
* @see https://vuejs.org/guide/extras/reactivity-transform.html
*/
reactivityTransform: false,

/**
* Externalize `vue`, `@vue/*` and `vue-router` when build
* Externalize `vue`, `@vue/*` and `vue-router` when building.
* @see https://github.com/nuxt/framework/issues/4084
*/
externalVue: false,

/**
* Tree shakes contents of client-only components from server bundle
* Tree shakes contents of client-only components from server bundle.
* @see https://github.com/nuxt/framework/pull/5750
*/
treeshakeClientOnly: false,

/**
* Split server bundle into multiple chunks and dynamically import them
* Split server bundle into multiple chunks and dynamically import them.
*
* Note: Enabling this flag can cause hydration issues in some platform.
*
* @see https://github.com/nuxt/framework/issues/6432
*/
viteServerDynamicImports: false,
viteServerDynamicImports: true,
}
}
4 changes: 2 additions & 2 deletions packages/schema/src/config/generate.ts
Original file line number Diff line number Diff line change
Expand Up @@ -115,12 +115,12 @@ export default {
* routes can be rendered (on the client-side) by Nuxt.
*
* * If unset or set to a falsy value, the name of the fallback HTML file will be `200.html`.
* * If set to true, the filename will be `404.html`.
* * If set to `true`, the filename will be `404.html`.
* * If you provide a string as a value, it will be used instead.
*
* @note Multiple services (e.g. Netlify) detect a `404.html` automatically. If
* you configure your web server on your own, please consult its documentation
* to find out how to set up an error page (and set it to the 404.html file)
* to find out how to set up an error page (and set it to the `404.html` file).
*/
fallback: { $resolve: val => val === true ? '400.html' : (val || '200.html') },

Expand Down
10 changes: 5 additions & 5 deletions packages/schema/src/config/nitro.ts
Original file line number Diff line number Diff line change
@@ -1,17 +1,17 @@
export default {
/**
* Configuration for Nitro
* Configuration for Nitro.
*
* @see https://nitro.unjs.io/config/
*
* @type {typeof import('nitropack')['NitroConfig']}
* @version 2
* @version 3
*/
*/
nitro: {},

/**
* Nitro server handlers
* Nitro server handlers.
*
* @see https://nitro.unjs.io/guide/routing.html
*
Expand All @@ -23,12 +23,12 @@ export default {
serverHandlers: [],

/**
* Nitro devevelopment-only server handlers
* Nitro development-only server handlers.
*
* @see https://nitro.unjs.io/guide/routing.html
*
* @type {typeof import('nitropack')['NitroDevEventHandler'][]}
* @version 3
*/
devServerHandlers: []
devServerHandlers: []
}
Loading