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

@josee9988/implode-css

v1.3.2

Published

Removes or checks all unused CSS selectors (Classes and Ids) from a project

Downloads

8

Readme

Implode-CSS 🌋💣

Npm CLI package that removes all unused CSS classes and ids from your project.


Version Downloads


Goal of the package 🎯

To remove useless/unused CSS selectors from a project to increase performance and readability.

If you create a project from scratch or use templates there is a high chance of creating CSS selectors that you will finally not use and will be downloaded by the user and will make the page performance slower.

With implodeCss you will be able to detect and/or remove these unused CSS.


Installation 🔩⚙

sudo npm install -g @josee9988/implode-css

Examples of use 📐🛡

  • If you do not know how to use the package, show the manual by using:

    implodeCss -h # to show the manual
  • To be prompted by the package, do not use arguments, we will help you:

    implodeCss # it will guide you
  • Specify folder (actual / absolute path):

    implodeCss . # actual folder, you must use always absolute paths but with the dot
    implodeCss /home/user/project # folder /home/user/project
  • Audit (detect but do not do any action):

    implodeCss . -a # audit actual package
  • Fix (remove all unused CSS selectors):

    implodeCss . -f # audit actual package
  • Ignore folders:

    implodeCss . -a -i src,data  # audit actual package and do not look into folders: /src/, /data/
  • Specify port (default = 4949):

    implodeCss . -a -p 8080 # audit actual package and create the server on port 4949

Screenshots 📸 😁

  • Auditing the code with: implodeCss . -a
  • Table with all the unused selectors and more information.
  • Help command: implodeCss -h
  • If you do not specify a folder...
  • If you do not specify the option to perform...

Error codes

200

  • Exists without errors.

201

  • Exit without an expected code, this code should not appear at all.

401

  • Bad arguments passed by the user. Some of the arguments used are not expected.

402

  • The path (most of the times the main folder) doesn't have read permissions, so the program could not read your files.

403 [Not used]

  • The path doesn't have write permissions (Not used anywhere yet. see 405 instead).

404

  • Found 0 CSS files or 0 HTML files. The user should provide atleast 1 CSS files and 1 HTML file.

405

  • The local temporary file doesn't have write permissions so the page with the results won't get any data.

406

  • A path inside the main folder doesn't have read or write permissions (not specified).

500

  • Unknown error, the package specified an error that doesn't exist (should not appear, if so, please contact us and tell us how).

501

  • The selected port couldn't be opened.

502

  • Unexpected error (should not appear, if so, please contact us and tell us how).

Did you enjoyed the package? Help us raise these numbers up 🥰 🎉

Github followers Github stars Github watchers Github forks

Also check the npm page with the package


⚠️Remember that this tool does not guarantee a 100% effectiveness and may have some issue at some point. Use it at your own risk and always do backups of your code.⚠️

Made with a lot of ❤️❤️ by @Josee9988