Socket
Socket
Sign inDemoInstall

clean-css-cli

Package Overview
Dependencies
4
Maintainers
1
Versions
49
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 5.4.2 to 5.5.0

5

History.md

@@ -0,1 +1,6 @@

[5.5.0 / 2021-12-08](https://github.com/clean-css/clean-css-cli/compare/5.4...v5.5.0)
==================
* Adds a new `--watch` switch, which makes CLI re-run optimizations when watched file(s) change.
[5.4.2 / 2021-10-21](https://github.com/clean-css/clean-css-cli/compare/v5.4.1...v5.4.2)

@@ -2,0 +7,0 @@ ==================

16

index.js

@@ -40,3 +40,4 @@ var fs = require('fs');

.option('--source-map-inline-sources', 'Enables inlining sources inside source maps')
.option('--with-rebase', 'Enable URLs rebasing');
.option('--with-rebase', 'Enable URLs rebasing')
.option('--watch', 'Runs CLI in watch mode');

@@ -148,3 +149,14 @@ program.on('--help', function () {

if (program.args.length > 0) {
minify(process, options, configurations, expandGlobs(program.args));
var expandedGlobs = expandGlobs(program.args);
if (inputOptions.watch) {
var inputPaths = expandedGlobs.map(function (path) { return path.expanded; });
minify(process, options, configurations, expandedGlobs);
require('chokidar').watch(inputPaths).on('change', function (pathToChangedFile) {
console.log(`File '${pathToChangedFile}' has changed. Rerunning all optimizations...`);
minify(process, options, configurations, expandedGlobs);
});
} else {
minify(process, options, configurations, expandedGlobs);
}
} else {

@@ -151,0 +163,0 @@ stdin = process.openStdin();

3

package.json
{
"name": "clean-css-cli",
"version": "5.4.2",
"version": "5.5.0",
"description": "A command-line interface to clean-css CSS optimization library",

@@ -37,2 +37,3 @@ "scripts": {

"dependencies": {
"chokidar": "^3.5.2",
"clean-css": "^5.2.2",

@@ -39,0 +40,0 @@ "commander": "7.x",

@@ -22,2 +22,3 @@ <h1 align="center">

- [Use](#use)
* [What's new in version 5.5](#whats-new-in-version-55)
* [What's new in version 5.1](#whats-new-in-version-51)

@@ -65,2 +66,8 @@ * [What's new in version 5.0](#whats-new-in-version-50)

## What's new in version 5.5
clean-css-cli 5.5 introduces the following changes / features:
* adds a new `--watch` switch, which makes `cleancss` re-run optimizations when watched file(s) change.
## What's new in version 5.1

@@ -67,0 +74,0 @@

SocketSocket SOC 2 Logo

Product

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

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc