Home > @rushstack/webpack-embedded-dependencies-plugin > LicenseFileGeneratorFunction
LicenseFileGeneratorFunction type
This API is provided as a beta preview for developers and may change based on feedback that we receive. Do not use this API in a production environment.
Function type that generates the license file.
Signature:
export type LicenseFileGeneratorFunction = (packages: IPackageData[]) => string;
References: IPackageData
Example
const licenseFileGenerator: LicenseFileGeneratorFunction = (packages: IPackageData[]): string => {
return packages
.map((pkg) => {
return `<h2>${pkg.name}</h2><p>${pkg.license}</p>`;
}).join('');
}