Warning: this tool will delete your inline comments and spaces between lines of code.
npm install source-rewrite -g in your favourite shell.
sr -f file.js -i ' ' -q single
file.js will be overwritten with the new generated code with two spaces for indentation and using single quotes. The available options are: