Skip to content

Commit 58c0000

Browse files
chore: Copy license files to artifacts (#113)
1 parent 5e804cd commit 58c0000

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

scripts/generate-package renamed to scripts/generate-package.js

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ const fs = require('fs');
88
const root = path.join(__dirname, '..');
99
const original = path.join(root, 'package.json');
1010
const originalContent = JSON.parse(fs.readFileSync(original).toString());
11+
const requiredFiles = ['README.md', 'NOTICE', 'LICENSE'];
1112

1213
const packages = [
1314
{
@@ -16,7 +17,7 @@ const packages = [
1617
main: './build/index.js',
1718
exports: {
1819
'.': './build/index.js',
19-
'./internal': './build/internal.js'
20+
'./internal': './build/internal.js',
2021
},
2122
files: ['shared', 'build'],
2223
},
@@ -51,6 +52,10 @@ packages.forEach((package) => {
5152
const { packageRoot, dependencies, manifest } = package;
5253
const { version } = originalContent;
5354

55+
requiredFiles.forEach((filename) => {
56+
fs.cpSync(path.join(root, filename), path.join(packageRoot, filename));
57+
});
58+
5459
const pkg = {
5560
version,
5661
...manifest,

0 commit comments

Comments
 (0)