0

I've been struggling trying to figure out how to automatically minify my json on save using Prepros. Prepros will do the same for all my JS and CSS, but it doesn't seem to have a built in functionality for handling JSON.

jbwharris
  • 710
  • 1
  • 10
  • 30

1 Answers1

0

I was able to solve this issue by installing JQ on my Mac. It will minify my JSON using it's command line tool. Then I was able to get that working using Prepros Custom Tools functionality.

Custom Tools settings for JQ in Prepros

Add the command jq -c . < {{input}} > {{output}} and you'll be able to get the JSON to minify as expected.

jbwharris
  • 710
  • 1
  • 10
  • 30