clean-css 4.0
See original GitHub issueHey folks,
So several new commits, I’ve been working on for a while, just landed in master. So far there’s a much simpler tokenizer & import inliner, while the optimizations are basically the same as in 3.4.
However the latter is going to change as well. Here are some ideas:
regroup- DONEsimple
andadvanced
optimizations into optimization levels, similar togcc
, i.e.-O0
(no optimizations just import inlining & rebasing),-O1
(default - same as basic previously),-O2
(same as advanced previously but with disabled restructuring) - EDIT: see #850ability to turn on/off any optimization in both API and CLI - EDIT: see #850- DONEwhitelist- EDIT: it’d nice but have but let’s leave it for 4.1.-O1
optimizations based on property name (how to handle shorthands?) instead of trying to blindly apply all optimizations to every and each value
And some other ideas for 4.0 not covered in tickets yet:
change- DONE in #857CleanCSS#minify
method tominify(styles, sourceMap, callback)
orminify(styles, callback)
sosourceMap
can be passed directly instead of via constructor as it does not belong theremerge- DONE as newprocessImport
andprocessImportFrom
into oneimports
flag which defaults tolocal
- which means remote imports being disabled by defaultinline
option- code in the current master gets rid of
root
,relativeTo
,target
options in favor of just a single optionrebaseTo
- this means all URLs has to be relative to the current directory, or, in case of imported files, relative to the imported file. All absolute URLs are left as they are. See da45a94c9f62a957c5a9baf940ba2299967b8632. I wonder if that’s enough. There was once an idea to allow specifyingtarget
value as a function, so maybe allowingrebaseTo
to be a function is a way to cover many use cases not covered above?
Feedback is more than welcome! Jakub
Issue Analytics
- State:
- Created 7 years ago
- Comments:28 (12 by maintainers)
Top Results From Across the Web
clean-css 4.0.0 vulnerabilities | Snyk - Snyk Vulnerability Database
clean-css is a fast and efficient CSS optimizer for Node.js platform and any modern browser. Affected versions of this package are vulnerable to...
Read more >clean-css/clean-css: Fast and efficient CSS optimizer ... - GitHub
clean-css is a fast and efficient CSS optimizer for Node.js platform and any modern browser. ... clean-css 4.0 introduces some breaking changes:.
Read more >clean-css-cli - npm
clean-css -cli 4.0 introduces some breaking changes: API and CLI interfaces are split, so CLI has been moved to this repository while API...
Read more >node_modules/clean-css - Pierre GAMBAROTTO - PLMlab
clean-css 4.0 introduces some breaking changes: API and CLI interfaces are split, so API stays in this repository while CLI moves to clean-css-cli;;...
Read more >clean-css 4.0.8
clean-css 4.0.8. Connector/Remote Repository ... To install clean-css, run the following command after configuring npm: npm install clean-css@4.0.8.
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
4.0 is out. Thanks again!
Closing this ticket as 4.0 is feature ready. Thanks @ngyikp @ben-eb @madwizard-thomas @alexlamsl for your valuable input! 💯