npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

prettier-cli-watcher

v1.0.6

Published

Runs prettier from CLI on project file(s) when modified.

Readme

prettier-cli-watcher

Runs prettier from CLI on project files when modified.

Install

Locally per project:

$ npm install prettier-cli-watcher --save-dev
# or
$ yarn add prettier-cli-watcher --dev

Or globally:

$ sudo npm install -g prettier-cli-watcher
# or
$ yarn global add prettier-cli-watcher

How To Use

$ prettier-cli-watcher

Or use a package.json script:

...
"scripts": {
  "pretty": "prettier-cli-watcher"
}
...

Then run via $ npm run pretty or $ yarn run pretty.

Options

  • --dir: The absolute path of directory to watch (default: process.cwd()).
  • --config: The project's prettier config is automatically located and used via cosmiconfig.
    • Or provide the file's absolute path or relative path to --dir.
  • --ignore: Like the prettier config, the project's .prettierignore file is also located and used.
    • Or provide the file's absolute path or relative path to --dir.
    • Note: By default the entire --dir directory is watched. Make sure to use a .prettierignore file to ignore paths like node_modules/, .git/, and dist/, for example.
  • --notify: Enable OS notifications when prettier errors.
  • --quiet: Disable output.
  • --setup: List setup details.
  • --dry: Run prettier without saving changes (for ignore test runs).
  • --version: List prettier-cli-watcher version.

Configuration Files

cosmiconfig is used to locate the project's prettier configuration file if one is not explicitly provided. Going from top to bottom, the following places are searched until a prettier configuration file is found. If one is not found the default prettier settings are used.

[
  'package.json',
  '.prettierrc',
  'configs/.prettierrc',
  '.prettierrc.json',
  'configs/.prettierrc.json',
  '.prettierrc.yaml',
  'configs/.prettierrc.yaml',
  '.prettierrc.yml',
  'configs/.prettierrc.yml',
  '.prettierrc.js',
  'configs/.prettierrc.js',
  'prettier.config.js',
  'configs/prettier.config.json',
  'configs/prettier.config.js',
  '.prettierrc.toml',
  'configs/.prettierrc.toml'
]

Likewise, the project's .prettierignore is looked for at the following locations. By default the entire --dir directory is watched so ensure to use a .prettierignore file to ignore paths like node_modules/, .git/, and dist/, for example.

[
  '.prettierignore',
  'configs/.prettierignore',
  'configs/prettierignore'
]

OS Support

  • Made using Node.js v8.14.0 on a Linux machine running Ubuntu 16.04.5 LTS.
  • Tested and working on:
    • macOS High Sierra (v10.13).
    • Windows 10 (v1703 OS Build: 15063.674).

Contributing

Contributions are welcome! Found a bug, feel like documentation is lacking/confusing and needs an update, have performance/feature suggestions or simply found a typo? Let me know! :)

See how to contribute here.

Attribution

License

This project uses the MIT License.