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

cssqueeze

Package Overview
Dependencies
Maintainers
1
Versions
11
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

cssqueeze

A CLI tool to optimize CSS files

  • 1.0.7
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
3
increased by50%
Maintainers
1
Weekly downloads
 
Created
Source

cssqueeze

A CLI tool to optimize CSS files

What is it?

A CLI tool that runs CSS files through a set of optimizations provided by cssnano. It exposes a bin called cssqueeze.

Installation

Install via npm which is bundled with node:

$ npm install --global cssqueeze

CLI Usage

$ cssqueeze --source source.css --destination bundle.min.css
# squeezed into -> ./bundle.min.css

Include a [hash] in the destination filename to generate a unique hash code based on the source content:

$ cssqueeze --source source.css --destination bundle.[hash].min.css
# squeezed into -> ./bundle.0d422da9649ff811b3c90224cca0680c.min.css

See cssqueeze --help for more info.

Custom Configuration

This tool uses cssnano as the optimization module. By default it wil use all advanced optimizations provided by cssnano.

Use the --config flag to pass a custom json configuration file. This allows you to enable / disable optimizations and to pass options to the individual optimization modules.

$ cssqueeze --custom config.json

The following configuration file disables the postcss-discard-comments plugin and sets autoprefixer browser targets to those that have more than 5% global usage statistics.

{
  "source": "./source.config.css",
  "destination": "./bundle.[hash].min.css",
  "plugins": {
    "postcss-discard-comments": false,
    "autoprefixer": {
      "browsers": ["> 5%"],
      "add": true
    }
  }
}

Keywords

FAQs

Package last updated on 18 Sep 2017

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