Skip to content
/ prettier Public

Pocket-size (typically < 60 MB) Docker image, containing only Node.js and Prettier

Notifications You must be signed in to change notification settings

izeau/prettier

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 

Repository files navigation

Prettier, in Docker

You probably should not use this.

Purpose

Pocket-size (typically < 60 MB) Docker image, containing only Node.js and Prettier, which you will probably only use in CI environments.

Warning

Extremely fragile, uses the latest stable Alpine image, packaged Node.js and published Prettier npm package. Extracts dynamically linked Node.js libraries, and rewrites a bit of Prettier on the fly.

Build

docker build -t prettier .

Usage

# Mount the current directory as a volume and run Prettier in every JS file, recursively
docker run -it --rm -w /workspace -v "$PWD:/workspace" prettier --write "**/*.js"

Slimmer image still?

You may delete parsers for TypeScript (about 3.2 MB) or Flow (about 3.0 MB) during the builder phase. Is there really a point, though?

About

Pocket-size (typically < 60 MB) Docker image, containing only Node.js and Prettier

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published