question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Hey 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:

  • regroupsimple and advanced optimizations into optimization levels, similar to gcc, 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 #850 - DONE
  • ability to turn on/off any optimization in both API and CLI - EDIT: see #850 - DONE
  • whitelist -O1 optimizations based on property name (how to handle shorthands?) instead of trying to blindly apply all optimizations to every and each value - EDIT: it’d nice but have but let’s leave it for 4.1.

And some other ideas for 4.0 not covered in tickets yet:

  • change CleanCSS#minify method to minify(styles, sourceMap, callback) or minify(styles, callback) so sourceMap can be passed directly instead of via constructor as it does not belong there - DONE in #857
  • merge processImport and processImportFrom into one imports flag which defaults to local - which means remote imports being disabled by default - DONE as new inline option
  • code in the current master gets rid of root, relativeTo, target options in favor of just a single option rebaseTo - 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 specifying target value as a function, so maybe allowing rebaseTo to be a function is a way to cover many use cases not covered above?

Feedback is more than welcome! Jakub

Issue Analytics

  • State:closed
  • Created 7 years ago
  • Comments:28 (12 by maintainers)

github_iconTop GitHub Comments

1reaction
jakubpawlowiczcommented, Jan 23, 2017

4.0 is out. Thanks again!

1reaction
jakubpawlowiczcommented, Jan 22, 2017

Closing this ticket as 4.0 is feature ready. Thanks @ngyikp @ben-eb @madwizard-thomas @alexlamsl for your valuable input! 💯

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found