UNPKG

@solidstate/hardhat-license-identifier

Version:
12 lines (11 loc) 578 B
import { filterSourcePaths, prependLicenseToSources, readLicenseFromPackageJson, } from '../lib/license_identifier.js'; const action = async (args, hre) => { const config = hre.config.licenseIdentifier; const sourcePaths = filterSourcePaths(config, await hre.solidity.getRootFilePaths()); const license = args.license || config.license || (await readLicenseFromPackageJson(hre.config.paths.root)); const overwrite = args.overwrite || config.overwrite; await prependLicenseToSources(sourcePaths, license, overwrite); }; export default action;