Socket
Socket
Sign inDemoInstall

clean-css-cli

Package Overview
Dependencies
Maintainers
1
Versions
49
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

clean-css-cli - npm Package Compare versions

Comparing version 4.0.12 to 4.1.0

index.js

9

History.md

@@ -0,1 +1,10 @@

[4.1.0 / 2017-05-08](https://github.com/jakubpawlowicz/clean-css-cli/compare/4.0...v4.1.0)
==================
* Bumps clean-css dependency to 4.1.x.
* Fixed issue [#1](https://github.com/jakubpawlowicz/clean-css-cli/issues/1) - option to remove inlined files.
* Fixed issue [#2](https://github.com/jakubpawlowicz/clean-css-cli/issues/2) - glob matching source paths.
* Fixed issue [#5](https://github.com/jakubpawlowicz/clean-css-cli/issues/5) - non-boolean compatibility options.
* Fixed issue [#7](https://github.com/jakubpawlowicz/clean-css-cli/issues/7) - using CLI as a module.
[4.0.12 / 2017-04-12](https://github.com/jakubpawlowicz/clean-css-cli/compare/v4.0.11...v4.0.12)

@@ -2,0 +11,0 @@ ==================

14

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

@@ -27,6 +27,14 @@ "scripts": {

},
"main": "index.js",
"files": [
"bin",
"History.md",
"index.js",
"LICENSE"
],
"homepage": "https://github.com/jakubpawlowicz/clean-css-cli#readme",
"dependencies": {
"clean-css": "^4.0.12",
"commander": "2.x"
"clean-css": "^4.1.0",
"commander": "2.x",
"glob": "7.x"
},

@@ -33,0 +41,0 @@ "devDependencies": {

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

* [Important: 4.0 breaking changes](#important-40-breaking-changes)
* [What's new in version 4.1](#whats-new-in-version-41)
* [CLI options](#cli-options)

@@ -33,2 +34,3 @@ * [Compatibility modes](#compatibility-modes)

+ [Level 2 optimizations](#level-2-optimizations)
* [As a module](#as-a-module)
- [FAQ](#faq)

@@ -77,2 +79,12 @@ * [How to optimize multiple files?](#how-to-optimize-multiple-files)

## What's new in version 4.1
clean-css-cli 4.1 introduces the following changes / features:
* `--remove-inlined-files` option for removing files inlined in <source-file ...> or via `@import` statements;
* adds glob pattern matching to source paths, see [example](#how-to-optimize-multiple-files);
* allows non-boolean compatibility options, e.g. `--compatibility selectors.mergeLimit=512`;
* extracts CLI into an importable module, so it can be reused and enhanced if needed;
* adds `beforeMinify` callback as a second argument to CLI module, see [example use case](#as-a-module).
## CLI options

@@ -90,2 +102,3 @@

--inline-timeout [seconds] Per connection timeout when fetching remote stylesheets (defaults to 5 seconds)
--remove-inlined-files Remove files inlined in <source-file ...> or via `@import` statements
--skip-rebase Disable URLs rebasing

@@ -225,5 +238,5 @@ --source-map Enables building input's source map

# `optimizeFilter` controls `filter` property optimizatons; defaults to `on`
# `optimizeFont controls `font` property optimizatons; defaults to `on`
# `optimizeFontWeight` controls `font-weight` property optimizatons; defaults to `on`
# `optimizeOutline` controls `outline` property optimizatons; defaults to `on`
# `removeEmpty` controls removing empty rules and nested blocks; defaults to `on` (since 4.1.0)
# `removeNegativePaddings` controls removing negative paddings; defaults to `on`

@@ -270,3 +283,6 @@ # `removeQuotes` controls removing quotes when unnecessary; defaults to `on`

# `removeDuplicateRules` controls duplicate rules removing; defaults to `on`
# `removeEmpty` controls removing empty rules and nested blocks; defaults to `on` (since 4.1.0)
# `removeUnusedAtRules` controls unused at rule removing; defaults to `off` (since 4.1.0)
# `restructureRules` controls rule restructuring; defaults to `off`
# `skipProperties` controls which properties won\'t be optimized, defaults to empty list which means all will be optimized (since 4.1.0)
```

@@ -280,2 +296,20 @@

# As a module
clean-css-cli can also be used as a module in a way of enhancing its functionality in a programmatic way, e.g.
```js
#!/usr/bin/env node
var cleanCssCli = require('clean-css-cli');
return cleanCssCli(process, function beforeMinify(cleanCss) {
cleanCss.options.level['1'].transform = function (propertyName, propertyValue) {
if (propertyName == 'background-image' && propertyValue.indexOf('../valid/path/to') == -1) {
return propertyValue.replace('url(', 'url(../valid/path/to/');
}
}
});
```
# FAQ

@@ -293,2 +327,8 @@

Since version 4.1.0 it can also be done using glob pattern matching, e.g.
```shell
cleancss -o merged.min.css *.css
```
## How to specify a custom rounding precision?

@@ -295,0 +335,0 @@

Sorry, the diff of this file is not supported yet

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