Wondering what’s next for npm?Check out our public roadmap! »

    hardhat-spdx-license-identifier
    TypeScript icon, indicating that this package has built-in type declarations

    2.0.3 • Public • Published

    Hardhat SPDX License Identifer

    Prepend Solidity source files in Hardhat projects with the SPDX License Identifier specified in package.json.

    Versions of this plugin prior to 2.0.0 were released as buidler-spdx-license-identifier.

    Installation

    yarn add --dev hardhat-spdx-license-identifier

    Usage

    Load plugin in Hardhat config:

    require('hardhat-spdx-license-identifier');

    Add configuration under the spdxLicenseIdentifier key:

    option description default
    overwrite whether to overwrite existing SPDX license identifiers false
    runOnCompile whether to automatically prepend identifiers during compilation false
    spdxLicenseIdentifier: {
      overwrite: true,
      runOnCompile: true,
    }

    The included Hardhat task may be run manually:

    yarn run hardhat prepend-spdx-license

    Files which do not contain a license identifier will be prepended with one. Files with a license identifier which does not match that which is specified in package.json may be updated, depending on configuration.

    Install

    npm i hardhat-spdx-license-identifier

    DownloadsWeekly Downloads

    852

    Version

    2.0.3

    License

    MIT

    Unpacked Size

    5.86 kB

    Total Files

    6

    Last publish

    Collaborators

    • avatar