/jsbeautifier-docker

Docker images for https://github.com/beautify-web/js-beautify

JS Beautifier

JS Beautifier in a Docker container for cleaning up your HTML, CSS, and JavaScript. This image exposes the CLI version of jsbeautifier.org.

Usage

If you have a JavaScript file ugly.min.js that needs beautification:

$ docker run -i asnelling/jsbeautifier < ugly.min.js > pretty.js

Input

With the -i flag after docker run, your ugly code is read from standard input, which is the file ugly.min.js in the above example.

Or, pass a file name that exists within the running container, like so:

$ docker run -v /path/to/ugly.min.js:/input.js asnelling/jsbeautifier input.js > pretty.js

Output

Your prettified JavaScript is printed to standard output, so pipe away!

Options

Refer to upstream author's GitHub page.

Tags

If you'd like to use the