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

grunt-contrib-cssmin

Package Overview
Dependencies
Maintainers
7
Versions
28
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

grunt-contrib-cssmin

Minify CSS

  • 0.14.0
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
261K
increased by6.71%
Maintainers
7
Weekly downloads
 
Created

What is grunt-contrib-cssmin?

The grunt-contrib-cssmin package is a Grunt plugin that helps you minify CSS files. It uses the clean-css library to perform the minification, which reduces the size of CSS files by removing unnecessary whitespace, comments, and other redundant data. This can help improve the performance of your web applications by reducing the amount of data that needs to be transferred over the network.

What are grunt-contrib-cssmin's main functionalities?

Minify CSS files

This feature allows you to minify CSS files. The code sample demonstrates how to configure the grunt-contrib-cssmin plugin to minify all CSS files in the 'src/css' directory and output the minified files to the 'dist/css' directory with a '.min.css' extension.

{
  "grunt.initConfig": {
    "cssmin": {
      "target": {
        "files": [{
          "expand": true,
          "cwd": "src/css",
          "src": ["*.css", "!*.min.css"],
          "dest": "dist/css",
          "ext": ".min.css"
        }]
      }
    }
  },
  "grunt.loadNpmTasks": "grunt-contrib-cssmin",
  "grunt.registerTask": ["default", ["cssmin"]]
}

Combine and minify multiple CSS files

This feature allows you to combine multiple CSS files into a single file and then minify it. The code sample shows how to configure the plugin to combine 'file1.css' and 'file2.css' from the 'src/css' directory into a single 'combined.min.css' file in the 'dist/css' directory.

{
  "grunt.initConfig": {
    "cssmin": {
      "target": {
        "files": {
          "dist/css/combined.min.css": ["src/css/file1.css", "src/css/file2.css"]
        }
      }
    }
  },
  "grunt.loadNpmTasks": "grunt-contrib-cssmin",
  "grunt.registerTask": ["default", ["cssmin"]]
}

Other packages similar to grunt-contrib-cssmin

Keywords

FAQs

Package last updated on 15 Sep 2015

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