@solidstate/hardhat-license-identifier
Version:
Prepend local Solidity source files with an SPDX License Identifier
8 lines (7 loc) • 722 B
TypeScript
import type { LicenseIdentifierConfig, SourceLicense } from '../types.js';
export declare const readLicenseFromPackageJson: (rootPath: string) => Promise<string>;
export declare const readSourceLicenses: (sourcePaths: string[], rootPath: string) => Promise<SourceLicense[]>;
export declare const filterSourcePaths: (config: LicenseIdentifierConfig, sourcePaths: string[]) => string[];
export declare const prependLicenseToSources: (sourcePaths: string[], license: string, overwrite: boolean) => Promise<void>;
export declare const hasMatchingLicense: (fileContent: string, license: string, overwrite: boolean) => boolean;
export declare const prependLicenseToFileContent: (fileContent: string, license: string) => string;