0.2.0 • Published 4 months ago

write-pretty-file v0.2.0

Weekly downloads
-
License
MIT
Repository
github
Last release
4 months ago

write-pretty-file

Write file and format it with prettier

✨ Features

  • :nail_care: Formats with prettier
  • :wrench: Uses your projects config
  • :file_folder: Creates directories if needed
  • :clipboard: If a prettier config is not found, uses prettier defaults instead
  • :mailbox: Automatically stringifies objects

Usage

import writePrettyFile from 'write-pretty-file'

await writePrettyFile('hello/world.json', { hello: 'world' })
await writePrettyFile('hello/world.ts', 'export default function (){}')

📦 Install

npm install write-pretty-file