clean-css-cli
Advanced tools
Comparing version 4.0.12 to 4.1.0
@@ -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 @@ ================== |
{ | ||
"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
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
Environment variable access
Supply chain riskPackage accesses environment variables, which may be a sign of credential stuffing or data theft.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Network access
Supply chain riskThis module accesses the network.
Found 2 instances in 1 package
Shell access
Supply chain riskThis module accesses the system shell. Accessing the system shell increases the risk of executing arbitrary code.
Found 1 instance in 1 package
395
1
37600
3
6
262
2
+ Addedglob@7.x
+ Addedbalanced-match@1.0.2(transitive)
+ Addedbrace-expansion@1.1.11(transitive)
+ Addedconcat-map@0.0.1(transitive)
+ Addedfs.realpath@1.0.0(transitive)
+ Addedglob@7.2.3(transitive)
+ Addedinflight@1.0.6(transitive)
+ Addedinherits@2.0.4(transitive)
+ Addedminimatch@3.1.2(transitive)
+ Addedonce@1.4.0(transitive)
+ Addedpath-is-absolute@1.0.1(transitive)
+ Addedwrappy@1.0.2(transitive)
Updatedclean-css@^4.1.0