rollup-plugin-cleanup

  • Version 3.2.1
  • Published
  • 36.7 kB
  • 2 dependencies
  • MIT license

Install

npm i rollup-plugin-cleanup
yarn add rollup-plugin-cleanup
pnpm add rollup-plugin-cleanup

Overview

Rollup plugin to trim trailing spaces, compact empty lines, and normalize line endings

Index

Functions

function cleanupPlugin

cleanupPlugin: (options?: cleanupPlugin.Options) => any;

    Interfaces

    interface Options

    interface Options {}

      property comments

      comments?: string | RegExp | Array<string | RegExp>;
      • Determinates which comments must be preserved. ['some']

      property compactComments

      compactComments?: boolean;
      • Should js-cleanup also compact whitespace and blank lines in the preserved multiline comments?

        Line-ending normalization is always done. true

      property exclude

      exclude?: PicoMatchGlob;
      • picomatch or array of picomatch patterns for paths to include in the process.

        See Also

        • https://github.com/micromatch/picomatch#globbing-features

      property extensions

      extensions?: string | string[];
      • String or array of strings with extensions of files to process. ['js','jsx','mjs']

      property include

      include?: PicoMatchGlob;
      • picomatch or array of picomatch patterns for paths to include in the process.

        See Also

        • https://github.com/micromatch/picomatch#globbing-features

      property lineEndings

      lineEndings?: 'unix' | 'mac' | 'win';
      • Type of Line-ending for normalization. 'unix'

      property maxEmptyLines

      maxEmptyLines?: number;
      • Maximum successive empty lines to preserve in the output.

        Use a positive value, or -1 to keep all the lines. 0

      property sourcemap

      sourcemap?: boolean;
      • Should generate a sourcemap? true

      Type Aliases

      type PicoMatchGlob

      type PicoMatchGlob = string | RegExp | Array<string | RegExp>;

        Package Files (1)

        Dependencies (2)

        Dev Dependencies (9)

        Peer Dependencies (1)

        Badge

        To add a badge like this onejsDocs.io badgeto your package's README, use the codes available below.

        You may also use Shields.io to create a custom badge linking to https://www.jsdocs.io/package/rollup-plugin-cleanup.

        • Markdown
          [![jsDocs.io](https://img.shields.io/badge/jsDocs.io-reference-blue)](https://www.jsdocs.io/package/rollup-plugin-cleanup)
        • HTML
          <a href="https://www.jsdocs.io/package/rollup-plugin-cleanup"><img src="https://img.shields.io/badge/jsDocs.io-reference-blue" alt="jsDocs.io"></a>