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 🙏

© 2024 – Pkg Stats / Ryan Hefner

cleanerfish

v0.0.6

Published

Scan your code to clean up actually unused files and dependencies

Downloads

16

Readme

Cleanerfish

About Cleanerfish

Cleanerfish is your new favourite utility to cleanup your node.js projects from actually unused files and dependencies!

Dependencies

Cleanerfish is not the usual boring and ineffective npm prune. Insteat it actually scans your project to seek dependencies that are not imported/required, but are present in your package.json and removes them!

Files (hard mode)

Cleanerfish can also scan your project to prune it from all files that are not imported/required in the filnal bundle (--hard or --hard-only). Just remember to always provide the list of entrypoints of your project (usualy not imported by something else) to prevent Cleanerfish to eat them up too - just use the --exclude-hard option.

Cleanerfish is compatible with both npm and yarn package managers and supports require, import and coffeescript syntaxes.

Cleanerfish Installation

npm instal -g cleanerfish

Cleanerfish Usage

Safe (confirmation required)

cleanerfish clean

Automatic (no confirmation required)

cleanerfish clean -y

Other options

-p, --folder-path <string>  specify a folder to inspect (must be a sub-folder of the project)
-f, --file <string>         specify a file to inspect (must be inside the project/main folder)
-i, --ignore <string>       ignore list of packages (comma-separated)
--prevent-defaults          prevent default ignored packages from being skipped (false by default)
--exclude-dirs <string>     specify a comma-separated list of directories to exclude (must be sub-folder of the project/main folder)
--exclude-files <string>    specify a comma-separated list of files to exclude (must be inside the project/main folder)
-c, --comments              considers commented imports as valid (false by default)
-o, --optional              include optionalDependencies (false by default)
-d, --dev                   include devDependencies (false by default)
--yarn                      use yarn instead of npm

Hard mode

Hard mode removes unused project files before scanning it for unimported dependencies.

cleanerfish clean --hard

--hard-only                 hard mode only (skip dependencies cleanup)
--exclude-hard <string>     prevent comma-separated files from being removed in hard/hard-only mode (e.g. project entrypoints)

List defaults

cleanerfish defaults