From 3fea5338f04f33dedf815766b4f197301fe3db68 Mon Sep 17 00:00:00 2001 From: anasouardini Date: Tue, 20 Feb 2024 00:09:27 +0100 Subject: [PATCH] fix: the outputed package.json of the newly created project was minified by mistake (default behavior of JSON.stringify). --- package.json | 2 +- src/cli/scrapeyard.ts | 2 +- src/cli/tools.ts | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/package.json b/package.json index ce853c0..490397f 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "scrapeyard", - "version": "0.5.7", + "version": "0.5.8", "description": "A scraping library that saves you from writing a lot of boiler-plate every time you lunch a new project. It also helps you manage multiple projects in one place.", "main": "./lib/mainInterface.js", "module": "./lib/mainInterface.mjs", diff --git a/src/cli/scrapeyard.ts b/src/cli/scrapeyard.ts index 2d2a97c..585c9d0 100644 --- a/src/cli/scrapeyard.ts +++ b/src/cli/scrapeyard.ts @@ -3,7 +3,7 @@ import tools from "./tools"; import vars, { Args } from "./vars"; -tools.printFileTree(vars.parentPath, "", ["node_modules"]); +// tools.printFileTree(vars.parentPath, "", ["node_modules"]); const packageInfo = tools.getPackageInfo(vars.parentPath); diff --git a/src/cli/tools.ts b/src/cli/tools.ts index bee89b4..f620b1d 100644 --- a/src/cli/tools.ts +++ b/src/cli/tools.ts @@ -74,7 +74,7 @@ function getPackageInfo(packgeDir: string): PackgeInfo { } function setPackageInfo(packgeDir: string, infoObj: Record) { - const packageInfoJSON = JSON.stringify(infoObj); + const packageInfoJSON = JSON.stringify(infoObj, null, " "); try { fs.writeFileSync( path.join(packgeDir, "package.json"),