Skip to content

Commit

Permalink
use tab character instead of spaces to decrease dist size
Browse files Browse the repository at this point in the history
  • Loading branch information
slavaleleka authored Jul 25, 2024
2 parents 272376a + 5a6645e commit 4b87e3f
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -106,11 +106,12 @@ function readJSON(source: string): unknown {
*
* @param destination Destination file path.
* @param data JSON data to write.
*
* @throws an error if the JSON file is invalid or destination does not exist.
*/
function writeJSON<T>(destination: string, data: T): void {
consola.info(`Writing ${destination} file`);
return fs.writeFileSync(destination, `${JSON.stringify(data, null, 4)}\n`);
fs.writeFileSync(destination, `${JSON.stringify(data, null, '\t')}\n`);
}

/**
Expand Down

0 comments on commit 4b87e3f

Please sign in to comment.