diff --git a/crates/vite_cli_snapshots/tests/cli_snapshots/fixtures/command_check_help/snapshots/command_check_help.md b/crates/vite_cli_snapshots/tests/cli_snapshots/fixtures/command_check_help/snapshots/command_check_help.md index 5a96658aa2..e38f2f7ec0 100644 --- a/crates/vite_cli_snapshots/tests/cli_snapshots/fixtures/command_check_help/snapshots/command_check_help.md +++ b/crates/vite_cli_snapshots/tests/cli_snapshots/fixtures/command_check_help/snapshots/command_check_help.md @@ -9,6 +9,9 @@ Usage: vp check [OPTIONS] [PATHS]... Run format, lint, and type checks. +Arguments: + [PATHS]... File paths to pass to fmt and lint + Options: --fix Auto-fix format and lint issues --no-fmt Skip format check @@ -33,6 +36,9 @@ Usage: vp check [OPTIONS] [PATHS]... Run format, lint, and type checks. +Arguments: + [PATHS]... File paths to pass to fmt and lint + Options: --fix Auto-fix format and lint issues --no-fmt Skip format check @@ -57,6 +63,9 @@ Usage: vp check [OPTIONS] [PATHS]... Run format, lint, and type checks. +Arguments: + [PATHS]... File paths to pass to fmt and lint + Options: --fix Auto-fix format and lint issues --no-fmt Skip format check diff --git a/crates/vite_cli_snapshots/tests/cli_snapshots/fixtures/command_exec/snapshots/command_exec.global.md b/crates/vite_cli_snapshots/tests/cli_snapshots/fixtures/command_exec/snapshots/command_exec.global.md index 3fcd864302..c8091c1938 100644 --- a/crates/vite_cli_snapshots/tests/cli_snapshots/fixtures/command_exec/snapshots/command_exec.global.md +++ b/crates/vite_cli_snapshots/tests/cli_snapshots/fixtures/command_exec/snapshots/command_exec.global.md @@ -88,17 +88,18 @@ Arguments: [COMMAND]... Command and arguments to execute Options: - -r, --recursive Select all packages in the workspace - -t, --transitive Select the current package and its transitive dependencies - -w, --workspace-root Select the workspace root package - -F, --filter Match packages by name, directory, or glob pattern - --fail-if-no-match Exit with a non-zero status if a filter matches no packages - -c, --shell-mode Execute the command within a shell environment - --parallel Run concurrently without topological ordering - --reverse Reverse execution order - --resume-from Resume from a specific package - --report-summary Save results to vp-exec-summary.json - -h, --help Print help (see more with '--help') + -r, --recursive Select all packages in the workspace + -t, --transitive Select the current package and its transitive dependencies + -w, --workspace-root Select the workspace root package + -F, --filter Match packages by name, directory, or glob pattern + --fail-if-no-match Exit with a non-zero status if a `--filter` expression matches no packages + Without this flag, unmatched filters only warn and exit successfully + -c, --shell-mode Execute the command within a shell environment + --parallel Run concurrently without topological ordering + --reverse Reverse execution order + --resume-from Resume from a specific package + --report-summary Save results to vp-exec-summary.json + -h, --help Print help Filter Patterns: --filter Select by package name (e.g. foo, @scope/*) diff --git a/crates/vite_cli_snapshots/tests/cli_snapshots/fixtures/command_exec/snapshots/command_exec.local.md b/crates/vite_cli_snapshots/tests/cli_snapshots/fixtures/command_exec/snapshots/command_exec.local.md index 701a4572cf..7d4bab6299 100644 --- a/crates/vite_cli_snapshots/tests/cli_snapshots/fixtures/command_exec/snapshots/command_exec.local.md +++ b/crates/vite_cli_snapshots/tests/cli_snapshots/fixtures/command_exec/snapshots/command_exec.local.md @@ -64,57 +64,37 @@ hello from subdir help message ``` -Execute a command from local node_modules/.bin +VITE+ - The Unified Toolchain for the Web Usage: vp exec [OPTIONS] [COMMAND]... +Execute a command from local node_modules/.bin. + Arguments: - [COMMAND]... - Command and arguments to execute + [COMMAND]... Command and arguments to execute Options: - -r, --recursive - Select all packages in the workspace - - -t, --transitive - Select the current package and its transitive dependencies - - -w, --workspace-root - Select the workspace root package - - -F, --filter - Match packages by name, directory, or glob pattern. - - --filter Select by package name (e.g. foo, @scope/*) - --filter ./ Select packages under a directory - --filter {} Same as ./, but allows traversal suffixes - --filter ... Select package and its dependencies - --filter ... Select package and its dependents - --filter ^... Select only the dependencies (exclude the package itself) - --filter ! Exclude packages matching the pattern - - --fail-if-no-match - Exit with a non-zero status if a `--filter` expression matches no packages. - - Without this flag, an unmatched filter (a typo, an empty glob, or a traversal like `{.}^...` that collapses to zero on a leaf package) only produces a warning and the command exits successfully. - - -c, --shell-mode - Execute the command within a shell environment - - --parallel - Run concurrently without topological ordering - - --reverse - Reverse execution order - - --resume-from - Resume from a specific package - - --report-summary - Save results to vp-exec-summary.json - - -h, --help - Print help (see a summary with '-h') + -r, --recursive Select all packages in the workspace + -t, --transitive Select the current package and its transitive dependencies + -w, --workspace-root Select the workspace root package + -F, --filter Match packages by name, directory, or glob pattern + --fail-if-no-match Exit with a non-zero status if a `--filter` expression matches no packages + Without this flag, unmatched filters only warn and exit successfully + -c, --shell-mode Execute the command within a shell environment + --parallel Run concurrently without topological ordering + --reverse Reverse execution order + --resume-from Resume from a specific package + --report-summary Save results to vp-exec-summary.json + -h, --help Print help + +Filter Patterns: + --filter Select by package name (e.g. foo, @scope/*) + --filter ./ Select packages under a directory + --filter {} Same as ./, but allows traversal suffixes + --filter ... Select package and its dependencies + --filter ... Select package and its dependents + --filter ^... Select only the dependencies (exclude the package itself) + --filter ! Exclude packages matching the pattern Examples: vp exec node --version # Run local node @@ -122,6 +102,8 @@ Examples: vp exec -c 'tsc --noEmit && prettier --check .' # Shell mode vp exec -r -- tsc --noEmit # Run in all workspace packages vp exec --filter 'app...' -- tsc # Run in filtered packages + +Documentation: https://viteplus.dev/guide/vpx ``` ## `vp exec` diff --git a/crates/vite_cli_snapshots/tests/cli_snapshots/fixtures/command_fmt_help/snapshots.toml b/crates/vite_cli_snapshots/tests/cli_snapshots/fixtures/command_fmt_help/snapshots.toml index e5ed072ecd..7566eedac4 100644 --- a/crates/vite_cli_snapshots/tests/cli_snapshots/fixtures/command_fmt_help/snapshots.toml +++ b/crates/vite_cli_snapshots/tests/cli_snapshots/fixtures/command_fmt_help/snapshots.toml @@ -5,4 +5,5 @@ steps = [ { argv = ["vp", "fmt", "-h"], continue-on-failure = true }, { argv = ["vp", "fmt", "--help"], continue-on-failure = true }, { argv = ["vp", "help", "fmt"], continue-on-failure = true }, + { argv = ["vp", "format", "--help"], continue-on-failure = true }, ] diff --git a/crates/vite_cli_snapshots/tests/cli_snapshots/fixtures/command_fmt_help/snapshots/command_fmt_help.md b/crates/vite_cli_snapshots/tests/cli_snapshots/fixtures/command_fmt_help/snapshots/command_fmt_help.md index 09616021a6..8d6a37a5df 100644 --- a/crates/vite_cli_snapshots/tests/cli_snapshots/fixtures/command_fmt_help/snapshots/command_fmt_help.md +++ b/crates/vite_cli_snapshots/tests/cli_snapshots/fixtures/command_fmt_help/snapshots/command_fmt_help.md @@ -10,13 +10,27 @@ Usage: vp fmt [PATH]... [OPTIONS] Format code. Options are forwarded to Oxfmt. +Arguments: + [PATH]... Files, directories, or glob patterns (default: current directory) + +Mode Options: + --stdin-filepath Specify the file name used to infer the parser for stdin + +Output Options: + --write Format and write files in place + --check Check whether files are formatted and show statistics + --list-different List files that would be changed + +Ignore Options: + --ignore-path Path to an ignore file; may be specified multiple times + --with-node-modules Format files in node_modules, which are skipped by default + +Runtime Options: + --no-error-on-unmatched-pattern Do not exit with an error when the pattern is unmatched + --threads Number of threads to use; set to 1 to use one CPU core + Options: - --write Format and write files in place - --check Check if files are formatted - --list-different List files that would be changed - --ignore-path Path to ignore file(s) - --threads Number of threads to use - -h, --help Print help + -h, --help Print help information Examples: vp fmt @@ -36,13 +50,27 @@ Usage: vp fmt [PATH]... [OPTIONS] Format code. Options are forwarded to Oxfmt. +Arguments: + [PATH]... Files, directories, or glob patterns (default: current directory) + +Mode Options: + --stdin-filepath Specify the file name used to infer the parser for stdin + +Output Options: + --write Format and write files in place + --check Check whether files are formatted and show statistics + --list-different List files that would be changed + +Ignore Options: + --ignore-path Path to an ignore file; may be specified multiple times + --with-node-modules Format files in node_modules, which are skipped by default + +Runtime Options: + --no-error-on-unmatched-pattern Do not exit with an error when the pattern is unmatched + --threads Number of threads to use; set to 1 to use one CPU core + Options: - --write Format and write files in place - --check Check if files are formatted - --list-different List files that would be changed - --ignore-path Path to ignore file(s) - --threads Number of threads to use - -h, --help Print help + -h, --help Print help information Examples: vp fmt @@ -62,13 +90,67 @@ Usage: vp fmt [PATH]... [OPTIONS] Format code. Options are forwarded to Oxfmt. +Arguments: + [PATH]... Files, directories, or glob patterns (default: current directory) + +Mode Options: + --stdin-filepath Specify the file name used to infer the parser for stdin + +Output Options: + --write Format and write files in place + --check Check whether files are formatted and show statistics + --list-different List files that would be changed + +Ignore Options: + --ignore-path Path to an ignore file; may be specified multiple times + --with-node-modules Format files in node_modules, which are skipped by default + +Runtime Options: + --no-error-on-unmatched-pattern Do not exit with an error when the pattern is unmatched + --threads Number of threads to use; set to 1 to use one CPU core + +Options: + -h, --help Print help information + +Examples: + vp fmt + vp fmt src --check + vp fmt . --write + +Documentation: https://viteplus.dev/guide/fmt +``` + +## `vp format --help` + +``` +VITE+ - The Unified Toolchain for the Web + +Usage: vp fmt [PATH]... [OPTIONS] + +Format code. +Options are forwarded to Oxfmt. + +Arguments: + [PATH]... Files, directories, or glob patterns (default: current directory) + +Mode Options: + --stdin-filepath Specify the file name used to infer the parser for stdin + +Output Options: + --write Format and write files in place + --check Check whether files are formatted and show statistics + --list-different List files that would be changed + +Ignore Options: + --ignore-path Path to an ignore file; may be specified multiple times + --with-node-modules Format files in node_modules, which are skipped by default + +Runtime Options: + --no-error-on-unmatched-pattern Do not exit with an error when the pattern is unmatched + --threads Number of threads to use; set to 1 to use one CPU core + Options: - --write Format and write files in place - --check Check if files are formatted - --list-different List files that would be changed - --ignore-path Path to ignore file(s) - --threads Number of threads to use - -h, --help Print help + -h, --help Print help information Examples: vp fmt diff --git a/crates/vite_cli_snapshots/tests/cli_snapshots/fixtures/command_helper/snapshots/command_helper.md b/crates/vite_cli_snapshots/tests/cli_snapshots/fixtures/command_helper/snapshots/command_helper.md index 3bd1dba12f..48460455a6 100644 --- a/crates/vite_cli_snapshots/tests/cli_snapshots/fixtures/command_helper/snapshots/command_helper.md +++ b/crates/vite_cli_snapshots/tests/cli_snapshots/fixtures/command_helper/snapshots/command_helper.md @@ -38,57 +38,61 @@ Options: pack help message ``` -vp pack +VITE+ - The Unified Toolchain for the Web -Usage: - $ vp pack [...files] +Usage: vp pack [...FILES] [OPTIONS] -Commands: - [...files] Bundle files +Build a library. +Options are forwarded to Vite+ Pack. -For more info, run any command with the `--help` flag: - $ vp pack --help +Arguments: + [...FILES] Files to bundle Options: - --config-loader Config loader to use: auto, native, tsx, unrun (default: auto) - --no-config Disable config file (default: true) - -f, --format Bundle format: esm, cjs, iife, umd (default: esm) + -f, --format Bundle format: esm, cjs, iife, umd (default: esm) --clean Clean output directory, --no-clean to disable - --deps.never-bundle Mark dependencies as external + --deps.never-bundle Mark dependencies as external --minify Minify output --devtools Enable devtools integration - --debug [feat] Show debug logs - --target Bundle target, e.g "es2015", "esnext" - -l, --logLevel Set log level: info, warn, error, silent + --debug [FEAT] Show debug logs + --target Bundle target, e.g "es2015", "esnext" + -l, --logLevel Set log level: info, warn, error, silent --fail-on-warn Fail on warnings (default: true) --no-write Disable writing files to disk, incompatible with watch mode (default: true) - -d, --out-dir Output directory (default: dist) + -d, --out-dir Output directory (default: dist) --treeshake Tree-shake bundle (default: true) --sourcemap Generate source map (default: false) --shims Enable cjs and esm shims (default: false) - --platform Target platform (default: node) + --platform Target platform (default: node) --dts Generate dts files --publint Enable publint (default: false) --attw Enable Are the types wrong integration (default: false) --unused Enable unused dependencies check (default: false) - -w, --watch [path] Watch mode - --ignore-watch Ignore custom paths in watch mode - --from-vite [vitest] Reuse config from Vite or Vitest + -w, --watch [PATH] Watch mode + --ignore-watch Ignore custom paths in watch mode + --from-vite [VITEST] Reuse config from Vite or Vitest --report Size report (default: true) - --env.* Define compile-time env variables - --env-file Load environment variables from a file, when used together with --env, variables in --env take precedence - --env-prefix Prefix for env variables to inject into the bundle (default: VITE_PACK_,TSDOWN_) - --on-success Command to run on success - --copy Copy files to output dir - --public-dir Alias for --copy, deprecated - --tsconfig Set tsconfig path + --env.* Define compile-time env variables + --env-file Load environment variables from a file, when used together with --env, variables in --env take precedence + --env-prefix Prefix for env variables to inject into the bundle (default: VITE_PACK_,TSDOWN_) + --on-success Command to run on success + --copy Copy files to output dir + --public-dir Alias for --copy, deprecated + --tsconfig Set tsconfig path --unbundle Unbundle mode - --root Root directory of input files + --root Root directory of input files --exe Bundle as executable - -W, --workspace [dir] Enable workspace mode - -F, --filter Filter configs (cwd or name), e.g. /pkg-name$/ or pkg-name + -W, --workspace [DIR] Enable workspace mode + -F, --filter Filter configs (cwd or name), e.g. /pkg-name$/ or pkg-name --exports Generate export-related metadata for package.json (experimental) -h, --help Display this message + +Examples: + vp pack + vp pack src/index.ts --dts + vp pack --watch + +Documentation: https://viteplus.dev/guide/pack ``` ## `vp fmt -h` @@ -96,44 +100,41 @@ Options: fmt help message ``` -Usage: [-c=PATH] [PATH]... +VITE+ - The Unified Toolchain for the Web + +Usage: vp fmt [PATH]... [OPTIONS] + +Format code. +Options are forwarded to Oxfmt. + +Arguments: + [PATH]... Files, directories, or glob patterns (default: current directory) Mode Options: - --init Initialize `.oxfmtrc.json` with default values - --migrate=SOURCE Migrate configuration to `.oxfmtrc.json` from specified source - Available sources: prettier, biome - --lsp Start language server protocol (LSP) server - --stdin-filepath=PATH Specify the file name to use to infer which parser to use + --stdin-filepath Specify the file name used to infer the parser for stdin Output Options: - --write Format and write files in place (default) - --check Check if files are formatted, also show statistics - --list-different List files that would be changed - -Config Options - -c, --config=PATH Path to the configuration file (.json, .jsonc, .ts, .mts, .cts, .js, - .mjs, .cjs) - --disable-nested-config Do not search for configuration files in subdirectories - -Ignore Options - --ignore-path=PATH Path to ignore file(s). Can be specified multiple times. If not - specified, .gitignore and .prettierignore in the current directory are - used. - --with-node-modules Format code in node_modules directory (skipped by default) - -Runtime Options - --no-error-on-unmatched-pattern Do not exit with error when pattern is unmatched - --threads=INT Number of threads to use. Set to 1 for using only 1 CPU core. - -Available positional items: - PATH Single file, path or list of paths. Glob patterns are also supported. - (Be sure to quote them, otherwise your shell may expand them before - passing.) Exclude patterns with `!` prefix like `'!**/fixtures/*.js'` - are also supported. If not provided, current working directory is used. - -Available options: - -h, --help Prints help information - -V, --version Prints version information + --write Format and write files in place + --check Check whether files are formatted and show statistics + --list-different List files that would be changed + +Ignore Options: + --ignore-path Path to an ignore file; may be specified multiple times + --with-node-modules Format files in node_modules, which are skipped by default + +Runtime Options: + --no-error-on-unmatched-pattern Do not exit with an error when the pattern is unmatched + --threads Number of threads to use; set to 1 to use one CPU core + +Options: + -h, --help Print help information + +Examples: + vp fmt + vp fmt src --check + vp fmt . --write + +Documentation: https://viteplus.dev/guide/fmt ``` ## `vp lint -h` @@ -141,112 +142,81 @@ Available options: lint help message ``` -Usage: [-c=<./.oxlintrc.json>] [PATH]... - -Basic Configuration - -c, --config=<./.oxlintrc.json> Oxlint configuration file - * `.json` and `.jsonc` config files are supported in all runtimes - * JavaScript/TypeScript config files are experimental and require - running via Node.js - * you can use comments in configuration files. - * tries to be compatible with ESLint v8's format - --tsconfig=<./tsconfig.json> Override the TypeScript config used for import resolution. - Oxlint automatically discovers the relevant `tsconfig.json` for each - file. Use this only when your project uses a non-standard tsconfig - name or location. - --init Initialize oxlint configuration with default values - -Allowing / Denying Multiple Lints - Accumulate rules and categories from left to right on the command-line. - For example `-D correctness -A no-debugger` or `-A all -D no-debugger`. - The categories are: - * `correctness` - Code that is outright wrong or useless (default) - * `suspicious` - Code that is most likely wrong or useless - * `pedantic` - Lints which are rather strict or have occasional false positives - * `perf` - Code that could be written in a more performant way - * `style` - Code that should be written in a more idiomatic way - * `restriction` - Lints which prevent the use of language and library features - * `nursery` - New lints that are still under development - * `all` - All categories listed above except `nursery`. Does not enable plugins - automatically. - -A, --allow=NAME Allow the rule or category (suppress the lint) - -W, --warn=NAME Deny the rule or category (emit a warning) - -D, --deny=NAME Deny the rule or category (emit an error) - -Enable/Disable Plugins - --disable-unicorn-plugin Disable unicorn plugin, which is turned on by default - --disable-oxc-plugin Disable oxc unique rules, which is turned on by default - --disable-typescript-plugin Disable TypeScript plugin, which is turned on by default - --import-plugin Enable import plugin and detect ESM problems. - --react-plugin Enable react plugin, which is turned off by default - --jsdoc-plugin Enable jsdoc plugin and detect JSDoc problems - --jest-plugin Enable the Jest plugin and detect test problems - --vitest-plugin Enable the Vitest plugin and detect test problems - --jsx-a11y-plugin Enable the JSX-a11y plugin and detect accessibility problems - --nextjs-plugin Enable the Next.js plugin and detect Next.js problems - --react-perf-plugin Enable the React performance plugin and detect rendering performance - problems - --promise-plugin Enable the promise plugin and detect promise usage problems - --node-plugin Enable the node plugin and detect node usage problems - --vue-plugin Enable the vue plugin and detect vue usage problems - -Fix Problems - --fix Fix as many issues as possible. Only unfixed issues are reported in - the output. - --fix-suggestions Apply auto-fixable suggestions. May change program behavior. - --fix-dangerously Apply dangerous fixes and suggestions - -Ignore Files - --ignore-path=PATH Specify the file to use as your `.eslintignore` - --ignore-pattern=PAT Specify patterns of files to ignore (in addition to those in - `.eslintignore`) - --no-ignore Disable excluding files from `.eslintignore` files, --ignore-path - flags and --ignore-pattern flags - -Handle Warnings - --quiet Disable reporting on warnings, only errors are reported - --deny-warnings Ensure warnings produce a non-zero exit code - --max-warnings=INT Specify a warning threshold, which can be used to force exit with an - error status if there are too many warning-level rule violations in - your project - -Output - -f, --format=ARG Use a specific output format. Possible values: `checkstyle`, - `default`, `agent`, `github`, `gitlab`, `json`, `junit`, `sarif`, - `stylish`, `unix` - --debug=OPTIONS Enable debug output options. Options are comma-separated. Possible - values: - * `files` - Print the list of files that will be linted, then exit. - * `timings` - Enable per-rule timing information. - -Miscellaneous - --silent Do not display any diagnostics - --no-error-on-unmatched-pattern Do not exit with an error when no files are selected for - linting (for example, after applying ignore patterns) - --threads=INT Number of threads to use. Set to 1 for using only 1 CPU core. - --print-config This option outputs the configuration to be used. When present, no - linting is performed and only config-related options are valid. - -Inline Configuration Comments - --report-unused-disable-directives Report directive comments like `// oxlint-disable-line`, - when no errors would have been reported on that line anyway - --report-unused-disable-directives-severity=SEVERITY Same as - `--report-unused-disable-directives`, but allows you to specify the - severity level of the reported errors. Only one of these two options - can be used at a time. - -Available positional items: - PATH Single file, single path or list of paths - -Available options: - --rules List all the rules that are currently registered - --lsp Start the language server - --disable-nested-config Disable the automatic loading of nested configuration files - --type-aware Enable rules that require type information - --type-check Enable experimental type checking (includes TypeScript compiler - diagnostics) - -h, --help Prints help information - -V, --version Prints version information +VITE+ - The Unified Toolchain for the Web + +Usage: vp lint [PATH]... [OPTIONS] + +Lint code. +Options are forwarded to Oxlint. + +Arguments: + [PATH]... Files or directories to lint + +Basic Configuration: + --tsconfig Override the TypeScript config used for import resolution + +Rule Severity: + -A, --allow Allow a rule or category + -W, --warn Emit a warning for a rule or category + -D, --deny Emit an error for a rule or category + +Plugins: + --disable-unicorn-plugin Disable the unicorn plugin, which is enabled by default + --disable-oxc-plugin Disable Oxc-specific rules, which are enabled by default + --disable-typescript-plugin Disable the TypeScript plugin, which is enabled by default + --import-plugin Enable the import plugin + --react-plugin Enable the React plugin + --jsdoc-plugin Enable the JSDoc plugin + --jest-plugin Enable the Jest plugin + --vitest-plugin Enable the Vitest plugin + --jsx-a11y-plugin Enable the JSX accessibility plugin + --nextjs-plugin Enable the Next.js plugin + --react-perf-plugin Enable the React performance plugin + --promise-plugin Enable the promise plugin + --node-plugin Enable the Node.js plugin + --vue-plugin Enable the Vue plugin + +Fix Problems: + --fix Fix issues when possible + --fix-suggestions Apply auto-fixable suggestions + --fix-dangerously Apply dangerous fixes and suggestions + +Ignore Files: + --ignore-path Use the specified .eslintignore file + --ignore-pattern Add file patterns to ignore + --no-ignore Disable file exclusion from ignore rules + +Handle Warnings: + --quiet Report errors only + --deny-warnings Exit non-zero when warnings are reported + --max-warnings Set the warning threshold before exiting non-zero + +Output: + -f, --format Set output format: checkstyle, default, agent, github, gitlab, json, junit, sarif, stylish, or unix + --debug Enable comma-separated debug output options: files or timings + +Miscellaneous: + --silent Do not display diagnostics + --no-error-on-unmatched-pattern Do not exit with an error when no files are selected for linting + --threads Number of threads to use; set to 1 to use one CPU core + --print-config Print the resolved configuration without linting + +Inline Configuration: + --report-unused-disable-directives Report unused oxlint-disable directives + --report-unused-disable-directives-severity Report unused disable directives at the specified severity + +Options: + --rules List all registered rules + --type-aware Enable rules requiring type information + --type-check Enable experimental type checking and compiler diagnostics + -h, --help Print help information + +Examples: + vp lint + vp lint src --fix + vp lint --type-aware --tsconfig ./tsconfig.json + +Documentation: https://viteplus.dev/guide/lint ``` ## `vp build -h` @@ -254,33 +224,43 @@ Available options: build help message ``` -vp/ +VITE+ - The Unified Toolchain for the Web + +Usage: vp build [ROOT] [OPTIONS] -Usage: - $ vp build [root] +Build for production. +Options are forwarded to Vite. + +Arguments: + [ROOT] Project root directory (default: current directory) Options: - --target [string] transpile target (default: 'baseline-widely-available') - --outDir [string] output directory (default: dist) - --assetsDir [string] directory under outDir to place assets in (default: assets) - --assetsInlineLimit [number] static asset base64 inline threshold in bytes (default: 4096) - --ssr [entry] [string] build specified entry for server-side rendering - --sourcemap [output] [boolean | "inline" | "hidden"] output source maps for build (default: false) - --minify [minifier] [boolean | "oxc" | "terser" | "esbuild"] enable/disable minification, or specify minifier to use (default: oxc) - --manifest [name] [boolean | string] emit build manifest json - --ssrManifest [name] [boolean | string] emit ssr manifest json - --emptyOutDir [boolean] force empty outDir when it's outside of root - -w, --watch [boolean] rebuilds when modules have changed on disk - --app [boolean] same as `builder: {}` - -c, --config [string] use specified config file - --base [string] public base path (default: /) - -l, --logLevel [string] info | warn | error | silent - --clearScreen [boolean] allow/disable clear screen when logging - --configLoader [string] use 'bundle' to bundle the config with Rolldown, or 'runner' (experimental) to process it on the fly, or 'native' (experimental) to load using the native runtime (default: bundle) - -d, --debug [feat] [string | boolean] show debug logs - -f, --filter [string] filter debug logs - -m, --mode [string] set env mode - -h, --help Display this message + --target Transpile target + --outDir Output directory + --assetsDir Directory for generated assets + --assetsInlineLimit Static asset inline threshold + --ssr [ENTRY] Build for server-side rendering + --sourcemap [MODE] Output source maps + --minify [MINIFIER] Enable or disable minification + --manifest [NAME] Emit a build manifest + --ssrManifest [NAME] Emit an SSR manifest + --emptyOutDir Empty outDir even when it is outside root + -w, --watch Rebuild when files change + --app Build an application with the builder API + --base Public base path + -l, --logLevel Set log level + --clearScreen Allow or disable clearing the screen + -d, --debug [FEAT] Show debug logs + -f, --filter Filter debug logs + -m, --mode Set env mode + -h, --help Print help + +Examples: + vp build + vp build --watch + vp build --sourcemap + +Documentation: https://viteplus.dev/guide/build ``` ## `vp test -h` @@ -288,102 +268,105 @@ Options: test help message ``` -vitest/4.1.10 - WARN: no options were found for your subcommands so we printed the whole output +VITE+ - The Unified Toolchain for the Web + +Usage: vp test [COMMAND] [FILTERS]... [OPTIONS] -Usage: - $ vitest [...filters] +Run tests once by default. +Options are forwarded to Vitest. Commands: - run [...filters] - related [...filters] - watch [...filters] - dev [...filters] - bench [...filters] - init - list [...filters] - [...filters] - complete [shell] - -For more info, run any command with the `--help` flag: - $ vitest run --help - $ vitest related --help - $ vitest watch --help - $ vitest dev --help - $ vitest bench --help - $ vitest init --help - $ vitest list --help - $ vitest --help - $ vitest complete --help - $ vitest --help --expand-help + run Run tests once + watch Run tests in watch mode + dev Run tests in development mode + related Run tests related to changed files + bench Run benchmarks + list List matching tests + +Arguments: + [FILTERS]... Test file filters Options: - -v, --version Display version number - -r, --root Root path - -c, --config Path to config file - -u, --update [type] Update snapshot (accepts boolean, "new", "all" or "none") - -w, --watch Enable watch mode - -t, --testNamePattern Run tests with full names matching the specified regexp pattern - --dir Base directory to scan for the test files - --ui Enable UI - --open Open UI automatically (default: !process.env.CI) - --api [port] Specify server port. Note if the port is already being used, Vite will automatically try the next available port so this may not be the actual port the server ends up listening on. If true will be set to 51204. Use '--help --api' for more info. - --silent [value] Silent console output from tests. Use 'passed-only' to see logs from failing tests only. - --hideSkippedTests Hide logs for skipped tests - --reporter Specify reporters (default, agent, minimal, blob, verbose, dot, json, tap, tap-flat, junit, tree, hanging-process, github-actions) - --outputFile Write test results to a file when supporter reporter is also specified, use cac's dot notation for individual outputs of multiple reporters (example: --outputFile.tap=./tap.txt) - --coverage Enable coverage report. Use '--help --coverage' for more info. - --mode Override Vite mode (default: test or benchmark) - --isolate Run every test file in isolation. To disable isolation, use --no-isolate (default: true) - --globals Inject apis globally - --dom Mock browser API with happy-dom - --browser Run tests in the browser. Equivalent to --browser.enabled (default: false). Use '--help --browser' for more info. - --pool Specify pool, if not running in the browser (default: forks) - --execArgv