rollup-plugin-license

  • Version 3.6.0
  • Published
  • 370 kB
  • 8 dependencies
  • MIT license

Install

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

Overview

Rollup plugin to add license banner to the final bundle and output third party licenses

Index

Functions

function rollupPluginLicense

rollupPluginLicense: (options: Options) => Plugin;

    Interfaces

    interface Dependency

    interface Dependency {}
    • Dependency information is derived from the package.json file

    property author

    readonly author: Person | null;
    • Author information.

    property contributors

    readonly contributors: Person[];
    • Dependency Contributes list.

    property description

    readonly description: string | null;
    • Dependency Description.

    property homepage

    readonly homepage: string | null;
    • Repository Public Homepage.

    property license

    readonly license: string | null;
    • SPDX License short ID.

    property licenseText

    readonly licenseText: string | null;
    • Full License file text.

    property maintainers

    readonly maintainers: string[];
    • Dependency Maintainers list.

    property name

    readonly name: string | null;
    • Dependency Name.

    property noticeText

    readonly noticeText: string | null;
    • Full notice file text.

    property private

    readonly private: boolean;
    • If dependency is private.

    property repository

    readonly repository: string | DependencyRepository | null;
    • Dependency Repository Location.

    property text

    text: () => string;
    • Turns the dependency into a formatted string

      Returns

      formatted dependency license info

    property version

    readonly version: string | null;
    • Dependency Version.

    interface Options

    interface Options {}

      property banner

      banner?: Factory<Banner>;
      • License banner to place at the top of your bundle

      property cwd

      cwd?: string;
      • Current Working Directory process.cwd()

      property debug

      debug?: boolean;
      • Debug mode false

      property sourcemap

      sourcemap?: boolean | string;

        property thirdParty

        thirdParty?: ThirdParty;
        • For third party dependencies. Creates a file containing a summary of all dependencies can be generated automatically

        interface Person

        interface Person {}
        • A person, as described in NPM documentation.

          See Also

          • https://docs.npmjs.com/cli/v7/configuring-npm/package-json#people-fields-author-contributors

        property email

        readonly email: string | null;
        • Person Email.

        property name

        readonly name: string;
        • Person Name.

        property text

        text: () => string;
        • Turns the person into a formatted string

          Returns

          formatted person info

        property url

        readonly url: string | null;
        • Person URL.

        Type Aliases

        type Banner = string | BannerOptions;

          type CommentStyle

          type CommentStyle = 'regular' | 'ignored' | 'slash' | 'none';

          type ThirdParty

          type ThirdParty = ThirdPartyOutputGeneratorFn | ThirdPartyOptions;

            Package Files (1)

            Dependencies (8)

            Dev Dependencies (29)

            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-license.

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