Include LICENSE.md in built package

Copy LICENSE.md as well as README.md to build when preparing package.
These files are useful for tools that inspect node_modules for
dependency details.
This commit is contained in:
Martin Packman
2020-11-14 14:57:44 +00:00
parent db180c555e
commit a2a8c6dc87
2 changed files with 11 additions and 1 deletions

View File

@@ -23,3 +23,13 @@ fs.writeFileSync(
JSON.stringify(pkg, null, 2),
'utf-8'
);
// copy in readme and license files
fs.copyFileSync(
path.resolve(__dirname, '../README.md'),
path.join(buildDir, 'README.md')
);
fs.copyFileSync(
path.resolve(__dirname, '../LICENSE.md'),
path.join(buildDir, 'LICENSE.md')
);