Skip to content
This repository has been archived by the owner on Jun 20, 2024. It is now read-only.

Use it in your terminal

CP Clermont edited this page May 26, 2022 · 5 revisions

You can use prettier in the terminal as you would normally with Node.js.

As a local dependency

You can add prettier as a script in your package.json,

{
  "scripts": {
    "prettier": "prettier"
  }
}

and then run it via

yarn run prettier path/to/file.liquid --write
# or
npm run prettier -- path/to/file.liquid --write

As a global dependency

If you installed the plugin globally, run

prettier path/to/file.liquid --write
Clone this wiki locally