Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

minify-css-map

Package Overview
Dependencies
Maintainers
1
Versions
4
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

minify-css-map

A simple CSS minifier and source map generator.

  • 0.0.6
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
5
increased by400%
Maintainers
1
Weekly downloads
 
Created
Source

CSS Minify and Map NPM Package

Welcome to the CSS Minify and Map NPM package! This tool is designed to minify CSS files while also generating source maps, providing a streamlined way to optimize your web application's performance.

Table of Contents

  • Introduction
  • Features
  • Installation
  • Usage
  • CLI Usage
  • Contributing
  • License

Introduction

The CSS Minify and Map NPM package provides a simple way to minify your CSS files and automatically generate source maps. It removes unnecessary whitespace, comments, and optimizes CSS files for better performance, ensuring that the original file structure can still be traced using the accompanying source maps.

Features

  • Minifies CSS files by removing comments and redundant spaces.
  • Automatically generates source maps to maintain readability for debugging.
  • Recursively processes entire directories to find and minify all .css files.
  • CLI integration for ease of use in any project.

Installation

To install the package, use npm:

npm install minify-css-map

Or use yarn:

yarn add minify-css-map

Usage

JavaScript API

You can use the CSS Minify and Map package programmatically within your Node.js projects.

import { minifyCssFile } from 'minify-css-map';

// Minify a specific CSS file
minifyCssFile('/path/to/styles.css');

CLI Usage

The package also provides a command-line interface for quick usage.

npx minify-css-map <target-directory>
npx minify-css-map . # Minify all CSS files in the current directory

This will recursively process all .css files in the given directory and create .min.css and .css.map files.

Contributing

Contributions are welcome! If you have any ideas, suggestions, or bug reports, please open an issue or submit a pull request.

License

This project is licensed under the MIT License.

Keywords

FAQs

Package last updated on 08 Oct 2024

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc