-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: copy package & other meta files
Signed-off-by: Vinayak Kulkarni <19776877+vinayakkulkarni@users.noreply.github.com>
- Loading branch information
1 parent
3207a3c
commit b1baff2
Showing
2 changed files
with
12 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
import { readFileSync, writeFileSync } from 'node:fs'; | ||
|
||
// read file into JSON | ||
const pkg = JSON.parse(readFileSync('package.json', 'utf-8')); | ||
const readme = readFileSync('README.md', 'utf-8'); | ||
const license = readFileSync('LICENSE', 'utf-8'); | ||
|
||
// write it to your output directory | ||
writeFileSync('./dist/package.json', JSON.stringify(pkg, null, 2)); | ||
writeFileSync('./dist/README.md', readme); | ||
writeFileSync('./dist/LICENSE', license); |