diff --git a/test/cli/samples/help/_config.js b/test/cli/samples/help/_config.js deleted file mode 100644 index b6f16a441..000000000 --- a/test/cli/samples/help/_config.js +++ /dev/null @@ -1,14 +0,0 @@ -const { readFileSync } = require('node:fs'); -const { join } = require('node:path'); -const assert = require('node:assert'); - -module.exports = defineTest({ - description: 'displays the help text', - spawnArgs: ['--help'], - result(stdout) { - const [firstLine, ...restLines] = stdout.trim().split('\n'); - assert.match(firstLine, /^rollup version \d+\.\d+\.\d+$/); - const expected = readFileSync(join(__dirname, '_expected'), 'utf8'); - assert.equal([...restLines].join('\n'), expected.trim()); - } -}); diff --git a/test/cli/samples/help/_expected b/test/cli/samples/help/_expected deleted file mode 100644 index 388ecfadb..000000000 --- a/test/cli/samples/help/_expected +++ /dev/null @@ -1,128 +0,0 @@ -===================================== - -Usage: rollup [options] - -Options: - --c, --config Use this config file (if argument is used but value - is unspecified, Rollup will try to load configuration files in - the following order: - rollup.config.mjs -> rollup.config.cjs -> 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-externalImportAttributes Omit import attributes 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) ---forceExit Force exit the process when done ---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 ---hashCharacters Use the specified character set for file hashes ---no-hoistTransitiveImports Do not hoist transitive imports into entry chunks ---importAttributesKey Use the specified keyword for import attributes ---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-reexportProtoFromExternal Ignore `__proto__` in star re-exports ---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 ---sourcemapDebugIds Emit unique debug ids in source and sourcemaps ---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.allowInputInsideOutputPath Whether the input path is allowed to be a - subpath of the output path ---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 - -Examples: - -# use settings in config file -rollup -c - -# in config file, process.env.INCLUDE_DEPS === 'true' -# and process.env.BUILD === 'production' -rollup -c --environment INCLUDE_DEPS,BUILD:production - -# create CommonJS bundle.js from src/main.js -rollup --format=cjs --file=bundle.js -- src/main.js - -# create self-executing IIFE using `window.jQuery` -# and `window._` as external globals -rollup -f iife --globals jquery:jQuery,lodash:_ \ - -i src/app.js -o build/app.js -m build/app.js.map - -Notes: - -* When piping to stdout, only inline sourcemaps are permitted - -For more information visit https://rollupjs.org