Important: This documentation covers Yarn 1 (Classic).
For Yarn 2+ docs and migration guide, see yarnpkg.com.

Package detail

@reteps/dockerfmt

reteps305.6kMIT0.3.6TypeScript support: included

Bindings around the Golang dockerfmt tooling. It uses tinygo to compile the Go code to WebAssembly, which is then used in the JS bindings.

readme

@reteps/dockerfmt

Bindings around the Golang dockerfmt tooling. It uses tinygo to compile the Go code to WebAssembly, which is then used in the JS bindings.

import { formatDockerfile } from '@reteps/dockerfmt'
// Alternatively, you can use `formatDockerfileContents` to format a string instead of a file.

const result = await formatDockerfile('../tests/comment.dockerfile', { indent: 4, trailingNewline: true })

console.log(result)