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

@types/clean-css

Package Overview
Dependencies
Maintainers
1
Versions
30
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@types/clean-css

TypeScript definitions for clean-css

  • 4.2.11
  • ts4.5
  • ts4.6
  • ts4.7
  • ts4.8
  • ts4.9
  • ts5.0
  • ts5.1
  • ts5.2
  • ts5.3
  • ts5.4
  • ts5.5
  • ts5.6
  • ts5.7
  • ts5.8
  • latest
  • Source
  • npm
  • Socket score

Version published
Maintainers
1
Created

What is @types/clean-css?

@types/clean-css provides TypeScript type definitions for the clean-css library, which is a fast and efficient CSS optimizer for reducing the size of CSS files.

What are @types/clean-css's main functionalities?

Minify CSS

This feature allows you to minify CSS code, reducing its size and improving load times. The code sample demonstrates how to use clean-css to minify a simple CSS string.

const CleanCSS = require('clean-css');
const input = 'a { font-weight: bold; }';
const output = new CleanCSS().minify(input);
console.log(output.styles);

Advanced Optimizations

This feature provides advanced optimization options for more aggressive CSS minification. The code sample shows how to use level 2 optimizations to further reduce the size of the CSS.

const CleanCSS = require('clean-css');
const input = 'a { color: #ff0000; }';
const options = { level: 2 };
const output = new CleanCSS(options).minify(input);
console.log(output.styles);

Source Maps

This feature allows you to generate source maps for the minified CSS, which can be useful for debugging. The code sample demonstrates how to enable source map generation.

const CleanCSS = require('clean-css');
const input = 'a { font-weight: bold; }';
const options = { sourceMap: true };
const output = new CleanCSS(options).minify(input);
console.log(output.sourceMap);

Other packages similar to @types/clean-css

FAQs

Package last updated on 21 Nov 2023

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