Take the 2-minute tour ×
Software Recommendations Stack Exchange is a question and answer site for people seeking specific software recommendations. It's 100% free, no registration required.

I'm working with WebStorm 8.0.4 from jetBrain.

We are manually editing a JSON file for the labels i18n. This file has the indents and the tabs. I would like to have it minify automatically, with a file watcher. Has anyone created a plugin or created the right file watcher?

share|improve this question

1 Answer 1

up vote 4 down vote accepted

You can try using json-minify:

  • npm install -g json-minify

  • create a new file watcher in WebStorm, like:

    Program: /path/to/json-minify/exec, like C:\Users\user.name\AppData\Roaming\npm\json-minify.cmd

    Arguments: $FileName$

    Working dir: $FileDir$

    Output paths to refresh: $FileNameWithoutExtension$.minified.json

Make sure to tick 'Create output file from stdout' checkbox

share|improve this answer
1  
Note that nodejs needs to be installed, and webstorm rebooted if nodejs was installed while webstorm was running. –  David Laberge Aug 13 at 13:45

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.