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

vue-class-whitespace-fixer

v1.1.1

Published

A tool to remove excessive whitespace in Vue class attributes.

Downloads

3

Readme

npm license downloads downloads downloads GitHub last commit

This package will be deprecated soon as it has been superseded by another package with a wider scope of usage.

You can check out the whitespace-fixer package for a more comprehensive solution.

vue-class-whitespace-fixer

A tool to fix excessive whitespace in class attributes of Vue files.

Description

vue-class-whitespace-fixer is a simple tool that helps clean up excessive whitespace in class attributes of Vue files. This is especially useful for projects using TailwindCSS, where class names can get quite long and whitespace management is important for readability and maintenance.

While the TailwindCSS Prettier plugin now removes excessive whitespace, the ESLint TailwindCSS plugin does not yet offer this functionality. vue-class-whitespace-fixer fills this gap by ensuring your Vue files have clean, consistent class attributes without excessive whitespace.

Installation

To install vue-class-whitespace-fixer, run:

npm install -g vue-class-whitespace-fixer

This will install the tool globally, allowing you to use it from anywhere on your system.

Usage

After installing the tool, you can run it from the command line. You need to provide the path to the directory containing your Vue files. If no directory is provided, the tool will default to the current directory.

Running the Tool

To run the tool on a specific directory:

vue-class-whitespace-fixer /path/to/your/vue/project

To run the tool in the current directory:

vue-class-whitespace-fixer .

Example

vue-class-whitespace-fixer /Users/yourname/projects/my-vue-app

This command will traverse through the specified directory, process all Vue files, and fix excessive whitespace in their class attributes.

Output

The tool will output the following information to the terminal:

  • The paths of the files that have been changed.
  • The total number of Vue files processed.
  • The number of files that have been changed.

Notes

  • The tool will skip processing for :class bindings as they often include dynamic expressions where whitespace could be intentional or necessary.
  • The node_modules directory is automatically excluded from processing.

License

This project is licensed under the ISC License.

Author

Afflexux