chore: fix building license for docs#3952
Conversation
|
@UziTech is attempting to deploy a commit to the MarkedJS Team on Vercel. A member of the Team first needs to authorize it. |
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
There was a problem hiding this comment.
Code Review
This pull request updates the documentation build script to copy the LICENSE file instead of LICENSE.md. Feedback suggests that copying the license into the source tree creates unnecessary duplication and potential pollution; it is recommended to either reference the source file directly during the build or ensure the temporary copy is deleted once the process completes.
| await mkdir(join(outputDir, 'lib')); | ||
| console.log(`Copying file ${join(inputDir, 'LICENSE.md')}`); | ||
| await copyFile(join(cwd, 'LICENSE.md'), join(inputDir, 'LICENSE.md')); | ||
| await copyFile(join(cwd, 'LICENSE'), join(inputDir, 'LICENSE.md')); |
There was a problem hiding this comment.
The current implementation copies the LICENSE file into the docs/ directory (which is part of the source tree) to make it available for the build process. This creates a duplicate file that persists in the repository after the build completes, which can be confusing for developers and may lead to accidental commits of the generated file if it is not properly gitignored. A more maintainable approach would be to process the LICENSE file directly from its source location or to ensure the temporary copy is removed after the build is finished to avoid source tree pollution.
Description
LICENSE.md was changed to LICENSE recently but not updated in docs
Contributor
Committer
In most cases, this should be a different person than the contributor.