diff --git a/docs/command-line-interface/index.md b/docs/command-line-interface/index.md index 99daadbb7..b7be09ca1 100755 --- a/docs/command-line-interface/index.md +++ b/docs/command-line-interface/index.md @@ -357,7 +357,6 @@ export default { 许多选项都有等效的命令行标志。在这些情况下,如果你正在使用配置文件,则此处传递的任何参数都将覆盖配置文件。以下是所有支持的选项列表: ``` -<<<<<<< HEAD -c, --config 使用此配置文件 (如果使用参数但未指定值,则默认为 rollup.config.js) -d, --dir 用于块的目录(如果不存在,则打印到 stdout) @@ -422,6 +421,7 @@ export default { --sourcemapBaseUrl 使用给定的基本 URL 发出绝对源映射 URL --sourcemapExcludeSources 在源映射中不包括源代码 --sourcemapFile 指定源映射的包位置 +--sourcemapFileNames 编译后 sourcemap 的命名模式 --stdin=ext 指定用于标准输入的文件扩展名 --no-stdin 不要从 stdin 读取 "-" --no-strict 不在生成的模块中发出 `"use strict";` @@ -447,98 +447,6 @@ export default { --watch.onError 在 "ERROR" 事件上运行的 Shell 命令 --watch.onStart 在 "START" 事件上运行的 Shell 命令 --watch.skipWrite 在监视时不要将文件写入磁盘 -======= --c, --config Use this config file (if argument is used but value - is unspecified, defaults to rollup.config.js) --d, --dir Directory for chunks (if absent, prints to stdout) --e, --external Comma-separate list of module IDs to exclude --f, --format Type of output (amd, cjs, es, iife, umd, system) --g, --globals Comma-separate list of `moduleID:Global` pairs --h, --help Show this help message --i, --input Input (alternative to ) --m, --sourcemap Generate sourcemap (`-m inline` for inline map) --n, --name Name for UMD export --o, --file Single output file (if absent, prints to stdout) --p, --plugin Use the plugin specified (may be repeated) --v, --version Show version number --w, --watch Watch files in bundle and rebuild on changes ---amd.autoId Generate the AMD ID based off the chunk name ---amd.basePath Path to prepend to auto generated AMD ID ---amd.define Function to use in place of `define` ---amd.forceJsExtensionForImports Use `.js` extension in AMD imports ---amd.id ID for AMD module (default is anonymous) ---assetFileNames Name pattern for emitted assets ---banner Code to insert at top of bundle (outside wrapper) ---chunkFileNames Name pattern for emitted secondary chunks ---compact Minify wrapper code ---context Specify top-level `this` value ---no-dynamicImportInCjs Write external dynamic CommonJS imports as require ---entryFileNames Name pattern for emitted entry chunks ---environment Settings passed to config file (see example) ---no-esModule Do not add __esModule property ---exports Specify export mode (auto, default, named, none) ---extend Extend global variable defined by --name ---no-externalImportAssertions Omit import assertions in "es" output ---no-externalLiveBindings Do not generate code to support live bindings ---failAfterWarnings Exit with an error if the build produced warnings ---filterLogs Filter log messages ---footer Code to insert at end of bundle (outside wrapper) ---no-freeze Do not freeze namespace objects ---generatedCode Which code features to use (es5/es2015) ---generatedCode.arrowFunctions Use arrow functions in generated code ---generatedCode.constBindings Use "const" in generated code ---generatedCode.objectShorthand Use shorthand properties in generated code ---no-generatedCode.reservedNamesAsProps Always quote reserved names as props ---generatedCode.symbols Use symbols in generated code ---no-hoistTransitiveImports Do not hoist transitive imports into entry chunks ---no-indent Don't indent result ---inlineDynamicImports Create single bundle when using dynamic imports ---no-interop Do not include interop block ---intro Code to insert at top of bundle (inside wrapper) ---logLevel Which kind of logs to display ---no-makeAbsoluteExternalsRelative Prevent normalization of external imports ---maxParallelFileOps How many files to read in parallel ---minifyInternalExports Force or disable minification of internal exports ---noConflict Generate a noConflict method for UMD globals ---outro Code to insert at end of bundle (inside wrapper) ---perf Display performance timings ---no-preserveEntrySignatures Avoid facade chunks for entry points ---preserveModules Preserve module structure ---preserveModulesRoot Put preserved modules under this path at root level ---preserveSymlinks Do not follow symlinks when resolving files ---no-sanitizeFileName Do not replace invalid characters in file names ---shimMissingExports Create shim variables for missing exports ---silent Don't print warnings ---sourcemapBaseUrl Emit absolute sourcemap URLs with given base ---sourcemapExcludeSources Do not include source code in source maps ---sourcemapFile Specify bundle position for source maps ---sourcemapFileNames Name pattern for emitted sourcemaps ---stdin=ext Specify file extension used for stdin input ---no-stdin Do not read "-" from stdin ---no-strict Don't emit `"use strict";` in the generated modules ---strictDeprecations Throw errors for deprecated features ---no-systemNullSetters Do not replace empty SystemJS setters with `null` ---no-treeshake Disable tree-shaking optimisations ---no-treeshake.annotations Ignore pure call annotations ---treeshake.correctVarValueBeforeDeclaration Deoptimize variables until declared ---treeshake.manualPureFunctions Manually declare functions as pure ---no-treeshake.moduleSideEffects Assume modules have no side effects ---no-treeshake.propertyReadSideEffects Ignore property access side effects ---no-treeshake.tryCatchDeoptimization Do not turn off try-catch-tree-shaking ---no-treeshake.unknownGlobalSideEffects Assume unknown globals do not throw ---validate Validate output ---waitForBundleInput Wait for bundle input files ---watch.buildDelay Throttle watch rebuilds ---no-watch.clearScreen Do not clear the screen when rebuilding ---watch.exclude Exclude files from being watched ---watch.include Limit watching to specified files ---watch.onBundleEnd Shell command to run on `"BUNDLE_END"` event ---watch.onBundleStart Shell command to run on `"BUNDLE_START"` event ---watch.onEnd Shell command to run on `"END"` event ---watch.onError Shell command to run on `"ERROR"` event ---watch.onStart Shell command to run on `"START"` event ---watch.skipWrite Do not write files to disk when watching ->>>>>>> 801ffd1a9bebe550b6a0ce665bdca1ead06313de ``` 以下标志仅通过命令行界面可用。所有其他标志都对应并覆盖其配置文件等效项,请参阅[选项大列表](../configuration-options/index.md)获取详细信息。 diff --git a/docs/configuration-options/index.md b/docs/configuration-options/index.md index 41aeb4098..53950e09b 100755 --- a/docs/configuration-options/index.md +++ b/docs/configuration-options/index.md @@ -1470,27 +1470,25 @@ export default { 如果 `output` 设置了值,那么 `sourcemapFile` 不是必须的,这种情况下,它的值会通过输出文件名中添加“.map”推断出来。 -<<<<<<< HEAD -### output.sourcemapIgnoreList {#output-sourcemapignorelist} -======= ### output.sourcemapFileNames | | | | ----: | :--------------------------------------------- | -| Type: | `string \| ((chunkInfo: ChunkInfo) => string)` | +| 类型: | `string \| ((chunkInfo: ChunkInfo) => string)` | | CLI: | `--sourcemapFileNames ` | -The pattern to use for sourcemaps, or a function that is called per sourcemap to return such a pattern. Patterns support the following placeholders: +该选项指定 sourcemap 的模式,或者是一个根据每个 sourcemap 调用以返回此类模式的函数。该模式支持以下占位符: -- `[format]`: The rendering format defined in the output options, e.g. `es` or `cjs`. -- `[hash]`: A hash based only on the content of the final generated sourcemap. You can also set a specific hash length via e.g. `[hash:10]`. -- `[chunkhash]`: The same hash as the one used for the corresponding generated chunk (if any). -- `[name]`: The file name (without extension) of the entry point, unless the object form of input was used to define a different name. +- `[format]`:在输出选项中定义的渲染格式,例如 `es` 或 `cjs`。 +- `[hash]`:一个仅基于最终生成的 sourcemap 内容的哈希值。也可以通过例如 `[hash:10]` 设置特定的哈希长度。 +- `[chunkhash]`:与对应生成的 chunk(如果有的话)使用的哈希值相同。 +- `[name]`:除非使用输入的对象形式定义了不同的名称,否则该文件名(不包括扩展名)就是入口起点的名称。 + +正斜杠 `/` 可以用来将文件放在子目录中。当使用函数时,`chunkInfo` 是 [`generateBundle`](../plugin-development/index.md#generatebundle) 中的简化版本,不包含依赖于文件名的属性,也没有关于渲染模块的信息,因为渲染只在生成文件名之后发生。但是,你可以访问其中的 `moduleIds` 列表。另请参见 [`output.assetFileNames`](#output-assetfilenames),[`output.chunkFileNames`](#output-chunkfilenames)。 Forward slashes `/` can be used to place files in sub-directories. When using a function, `chunkInfo` is a reduced version of the one in [`generateBundle`](../plugin-development/index.md#generatebundle) without properties that depend on file names and no information about the rendered modules as rendering only happens after file names have been generated. You can however access a list of included `moduleIds`. See also [`output.assetFileNames`](#output-assetfilenames), [`output.chunkFileNames`](#output-chunkfilenames). -### output.sourcemapIgnoreList ->>>>>>> 801ffd1a9bebe550b6a0ce665bdca1ead06313de +### output.sourcemapIgnoreList {#output-sourcemapignorelist} | | | | --: | :-- |