JSPM

write-pretty-file

0.0.1
  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • Downloads 19
  • Score
    100M100P100Q58203F
  • License MIT

Write file and automatically format it with your projects prettier config

Package Exports

  • write-pretty-file
  • write-pretty-file/dist/index.js

This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (write-pretty-file) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

Readme

write-pretty-file

Write file and automatically format it with your projects prettier config

✨ Features

  • Formats with prettier (using your projects config)
  • Creates parent directories if needed
  • If a prettier config is not found, uses prettier defaults instead

Usage

import write from 'write-pretty-file'

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

📦 Install

npm install write-pretty-file