@void-fs/format-write
TypeScript icon, indicating that this package has built-in type declarations

0.0.1-beta.15 • Public • Published

@void-fs/format-write

使用 prettier 格式化写入文件

NPM Version NPM Downloads NPM License

自动根据文件名后缀格式化文件

writeFileWithFormat('/user/style.css', `* {width:100%;}`)

自定义 prettier 配置

writeFileWithFormat('/user/style.css', `* {width:100%;}`, {
  config: {
    semi: true,
  },
})

自定义 prettier parser

writeFileWithFormat('/user/style.css', `* {width:100%;}`, {
  parser: 'less',
})

全部方法

writeCSS

writeFileWithFormat

writeJSON

writeTS

License

MIT License

Readme

Keywords

none

Package Sidebar

Install

npm i @void-fs/format-write

Weekly Downloads

2

Version

0.0.1-beta.15

License

MIT

Unpacked Size

8.45 kB

Total Files

7

Last publish

Collaborators

  • whitekite