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

@hungpm372/css-obfuscator

v1.0.16

Published

A CLI tool to obfuscate CSS classes

Downloads

8

Readme

css-obfuscator

css-obfuscator is a powerful CLI tool that helps obfuscate CSS classes in your project, supporting code cleaning and protection of sensitive information. This tool is designed to work with projects using Next.js, Tailwind CSS, or any other CSS framework.

Features

  • CSS Class Obfuscation: Renames CSS classes to protect source code and reduce the possibility of code reversal.
  • Easy-to-use CLI: Provides a simple command-line interface for easy integration into the development process.
  • TypeScript Support: Built-in TypeScript support to improve development experience.

Installation

To install css-obfuscator, you can use npm or yarn.

Global Installation

npm install -g css-obfuscator

Local Installation

npm install --save-dev css-obfuscator

Usage

Below are the basic commands to use css-obfuscator.

Launch the Tool

css-obfuscator [options]

Options

  • --input, -i: Path to the CSS file or directory to obfuscate.
  • --output, -o: Path to the output directory to store obfuscated CSS files.
  • --help, -h: Display help about options and command syntax.

Example

Obfuscate CSS classes from the src/css directory and save the result to dist/css:

css-obfuscator -i src/css -o dist/css

Configuration

css-obfuscator supports configuration through JSON or JavaScript configuration files. You can customize how the tool obfuscates CSS classes according to your needs.

Example Configuration File (.css-obfuscator.config.json)

{
  "input": "src/css",
  "output": "dist/css",
  "prefix": "obf_"
}

CI/CD Integration

css-obfuscator can be integrated into your CI/CD pipeline. You can configure the tool to run automatically when building or testing the project.

Example .gitlab-ci.yml

stages:
  - build

build_css_obfuscation:
  stage: build
  script:
    - npx css-obfuscator -i src/css -o dist/css

Testing and Building

Run Tests

Run linter tests to ensure the source code follows coding rules:

npm run lint

Format Code

Use Prettier to format the source code:

npm run format

Build Project

Build the project and create output files:

npm run build

Publish to NPM

To publish a new version of the tool to npm, run:

npm run publish@npm

Contributing

We always welcome contributions from the community. If you want to participate in improving this project, please follow these steps:

  1. Fork the project.
  2. Create a new branch for your changes (git checkout -b my-feature).
  3. Make changes and commit (git commit -am 'Add some feature').
  4. Push your branch to GitHub (git push origin my-feature).
  5. Open a Pull Request.

License

This project is released under the ISC License.

Contact

If you have any questions or feedback, please contact us via GitHub Issues.