Rush StackShopBlogEvents
Skip to main content

Home > @rushstack/package-extractor > IExtractorOptions

IExtractorOptions interface

Options that can be provided to the extractor.

Signature:

export interface IExtractorOptions 

Properties

PropertyModifiersTypeDescription
createArchiveFilePath?string(Optional) The desired path to be used when archiving the target folder. Supported file extensions: .zip.
createArchiveOnly?boolean(Optional) Whether to skip copying files to the extraction target directory, and only create an extraction archive. This is only supported when linkCreation is 'script' or 'none'.
folderToCopy?string(Optional) An additional folder containing files which will be copied into the root of the extraction.
includeDevDependencies?boolean(Optional) If dependencies from the "devDependencies" package.json field should be included in the extraction.
includeNpmIgnoreFiles?boolean(Optional) If files ignored by the .npmignore file should be included in the extraction.
linkCreation?'default' | 'script' | 'none'(Optional) The link creation mode to use. "default": Create the links while copying the files; this is the default behavior. Use this setting if your file copy tool can handle links correctly. "script": A Node.js script called create-links.js will be written to the target folder. Use this setting to create links on the server machine, after the files have been uploaded. "none": Do nothing; some other tool may create the links later, based on the extractor-metadata.json file.
mainProjectNamestringThe main project to include in the extraction operation.
overwriteExistingbooleanWhether to overwrite the target folder if it already exists.
pnpmInstallFolder?string(Optional) The folder where the PNPM "node_modules" folder is located. This is used to resolve packages linked to the PNPM virtual store.
projectConfigurationsIExtractorProjectConfiguration[]Configurations for individual projects, keyed by the project path relative to the sourceRootFolder.
sourceRootFolderstringThe source folder that copying originates from. Generally it is the repo root folder.
targetRootFolderstringThe target folder for the extraction.
terminalITerminalA terminal to log extraction progress.
transformPackageJson?(packageJson: IPackageJson) => IPackageJson | undefined(Optional) The pnpmfile configuration if using PNPM, otherwise undefined. The configuration will be used to transform the package.json prior to extraction.