UNPKG

@solidstate/hardhat-license-identifier

Version:
11 lines (10 loc) 611 B
import { filterSourcePaths, readLicenseFromPackageJson, readSourceLicenses, } from '../lib/license_identifier.js'; import { printSourceLicenses } from '../lib/print.js'; const action = async (args, hre) => { const config = hre.config.licenseIdentifier; const sourcePaths = filterSourcePaths(config, await hre.solidity.getRootFilePaths()); const packageJsonLicense = await readLicenseFromPackageJson(hre.config.paths.root); const sourceLicenses = await readSourceLicenses(sourcePaths, hre.config.paths.root); printSourceLicenses(packageJsonLicense, sourceLicenses); }; export default action;