Skip to content

Commit

Permalink
Use CRLF endings for writing to package.json
Browse files Browse the repository at this point in the history
Prevents diffs from showing the file as modified even though the only
differences are the line endings written by Rollup.
Should make absolutely no differences in code, just a QOL DX change.

Also suppress the "unused variable" warning.
  • Loading branch information
MajorTanya committed Apr 9, 2024
1 parent 739dce2 commit 5da413a
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion rollup.config.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -33,8 +33,9 @@ pkg.exports = files.reduce((acc, file) => {
}, {});

// write updated package.json
await fs.writeJSON('./package.json', pkg, { spaces: 2 });
await fs.writeJSON('./package.json', pkg, { spaces: 2, EOL: '\r\n' });

// noinspection JSUnusedGlobalSymbols
export default async () => {
console.log(files.map(f => f.path));

Expand Down

0 comments on commit 5da413a

Please sign in to comment.