write-prettier-file

3.0.3 • Public • Published

write-prettier-file

Build Status Coverage Npm Version MIT License

write prettier formatted file

Install

yarn add write-prettier-file

Ustage

import writePrettierFile from 'write-prettier-file'

await writePrettierFile('example.js', `hello('world');`)

API

writePrettierFile(file, data, options?)

file

Type: string | URL

Path to file.

data

Type: string

Source code, you want to format

options

Type: object

any value prettier-format takes

options.resolveConfig

Type: boolean

Set to false to prevent load config.

Related

Readme

Keywords

none

Package Sidebar

Install

npm i write-prettier-file

Weekly Downloads

216

Version

3.0.3

License

MIT

Unpacked Size

5.82 kB

Total Files

5

Last publish

Collaborators

  • fisker