@solidstate/hardhat-license-identifier
Version:
Prepend local Solidity source files with an SPDX License Identifier
30 lines (24 loc) • 654 B
text/typescript
import type { SourceLicense } from '../types.js';
import { createTable } from '@solidstate/hardhat-solidstate-utils/table';
export const printSourceLicenses = (sourceLicenses: SourceLicense[]) => {
const table = createTable();
table.push([
{
content: 'package.json license',
},
{
content: 'TODO: try to store ',
},
]);
table.push([
{
content: 'Source Path',
},
{ content: 'License' },
]);
for (const sourceLicense of sourceLicenses) {
const { sourcePath, license } = sourceLicense;
table.push([{ content: sourcePath }, { content: license }]);
}
console.log(table.toString());
};