From 0448e1826a1ad3d2887e763a3768910e4533d013 Mon Sep 17 00:00:00 2001 From: Mayeu - Cast Date: Wed, 27 Mar 2019 09:26:18 +0700 Subject: [PATCH] Ensure that the CLI output valid JSON This commit ensure that the CLI output valid JSON on stdout, so that it could then be manipulated in the shell using jq or other JSON manipulation tool. Previously the output was not JSON valid making it hard to reuse. --- bin/purgecss | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/bin/purgecss b/bin/purgecss index 8dff2e3b..21d48efa 100644 --- a/bin/purgecss +++ b/bin/purgecss @@ -68,5 +68,5 @@ if (argv.out) { }) } } else { - console.log(purgecss.purge()) -} \ No newline at end of file + console.log(JSON.stringify(purgecss.purge())) +}