Make sure license ends up in SvelteKit bundle (#2728)

This commit is contained in:
Lettnald
2025-01-17 09:13:47 +01:00
committed by GitHub
parent 31c3fefc17
commit 27c667556b
+4 -2
View File
@@ -1,11 +1,13 @@
import fs from 'fs';
import pkg from '../package.json' with { type: 'json' };
const license = fs.readFileSync('LICENSE', 'utf-8')
export function getJSBanner() {
return `/**
* @license ${pkg.name} v${pkg.version} - ${pkg.license}
*
* This source code is licensed under the ${pkg.license} license.
* See the LICENSE file in the root directory of this source tree.
* ${license.split('\n').join('\n * ')}
*/
`;
}