- Cope with selectors with a
\character before the:pull#426
- Add a
.npmignoreto avoid shipping tests and backup files.
- Upgrade sub-dependency
find-my-waypull#407
-
The main parameter
urlscan no be a string called justurl. You just need to either useurls(array) orurl(string). -
New
ignoreRequestErrorsoption to ignore HTTP responses that are>=400. pull#365 Thanks @Fgruntjes -
(Chore) Switching from TravisCI to GitHub Actions
- Upgrade dependency on
puppeteerto^2.0.0
-
Ability to pass a list of whitelist selector regexes pull#344 Thanks @AlexDubok
-
Upgrade dependency on
css-treeto1.0.0-alpha.37 -
Upgrade dependency on
cssoto~4.0.2
- You can now render exclusively with JavaScript disabled. pull#312 Thanks @VladislavTkachuk
- Big optimization. By looking up the "parent CSS selector" pre-emptively it can quickly discard repeated "child CSS selectors". pull#296
- Ignore
<link rel="preload">and<link rel="prefetch">tags whosehrefvalue was a.cssextension. pull#275 Thanks @nicolas-t
-
By default, Service Workers are disabled. This new feature requires an upgrade of puppeteer to
^1.8.0. pull#265 -
Ability to also extract the CSS of all
styletags with thestyletagsoption. pull#260 Thanks @jc275
-
Not crash if the CSS contains multiple semicolons which crashes csso (css/csso#378) pull#259 Thanks @jc275
-
Stylesheet
linktags whosehrefURL contains a#fragment-examplewould cause an error because puppeteer doesn't include it in theresponse.url(). pull#255 Thanks @jc275
- New option
ignoreJSErrorsto ignore possible JavaScript errors. pull#253 Thanks @jc275
- New option
ignoreCSSErrorsto ignore possible CSS parsing errors. pull#249 Thanks @stereobooster
- Throw explicit errors on invalid CSS pull#237 Thanks @harrygreen
-
List what timed out. Useful for debugging which resources failed. pull#199 Thanks @stereobooster
-
Upgrade to puppeteer 1.4.0 pull#214
- Ability to pass an object of options to
csso.compress()pull#167 Thanks @usebaz
-
Fix for logic of using the
--withoutjavascriptargument. pull#163 Thanks @stereobooster -
Upgrade
puppeteerdependency to version 1.2. -
Fix for
304 Not Modifiedresponses that actually don't redirect. pull#165 Thanks @stereobooster
- Fix for pages that uses
data:text/css ...as thehrefi<link>tags. pull#159
- Data URIs in external stylesheets lost the
data:part. pull#153 Thanks @stereobooster and @phiresky for reporting.
- Any query strings in URLs in CSS is now preserved. pull#148 Thanks @usebaz
-
Important fix for how multiple external stylesheets are parsed in the exact order the
<link rel=stylesheet>tags appear in the HTML. pull#131 -
The response interceptor skips or includes resources based on
responseTypeinstead of URL and filename. pull#118 Thanks @stereobooster
-
Redirects, both of external style sheets and other URLs is now correctly followed. pull#106
-
Remove
@media printrules. pull#101 -
Switching to wait for
networkidle0instead to allow the page slightly more time to finish more XHR and static resources. pull#87
-
All
@font-facerules whose name is never mentioned in any remaining selector is now deleted. pull#81 -
Rules inside
keyframeat-rules are not analyzed. pull#83
- Much better error handling. If a CSS file fails to download or some JavaScript on the page throws an error, the minimalcss process now exits immediately, closes the puppeteer instance, and triggers the rejection on the main promise. Thanks @stereobooster pull#65
- Supports setting
viewport. Both via the cli and via the pure API. Thanks @stereobooster pull#64 And works on the cli by passing a JSON string pull#78
- Works with and requires puppeteer 1.0.0. pull#74 Thanks @jonathaningram
-
Engine massively refactored by the author of csstree and csso himself; @lahmatiy
-
The
minimalcss.minimize()functions promise no longer contains astylesheetAstObjectsobjects. It wasn't clear which AST it should be. Thanks again @lahmatiy -
Redundant and never referred to
keyframesget automatically removed. pull#57. -
greenkeeper.io now helps maintain dependency upgrades.
- Every URL you pass gets loaded twice. First without Javascript and then with JavaScript (and waiting for network to be idle). These means the minimal CSS will contain CSS that was necessary before the page is fully loaded as well. Also, the engine has entirely changed. Instead of evaluating the DOM inside a page evaluation (the equivalent of running in the Web Console), puppeteer is only used to 1) download relevant assets and 2) yield the DOM as a string of HTML. Instead cheerio is used to compare the CSS to the DOM. pull#53
- Any errors raised internally by
document.querySelector()are not swallowed unless run withoptions.debug == truepull#40
-
Option to override user agent used by
puppeteer. pull#37 Thanks @stereobooster -
Correction of relative URLs in CSS fixed. E.g.
url(images/img.png)in/styles/main.cssnow becomesurl(/styles/images/img.png)pull#28 Thanks @stereobooster -
New option
browserif you already have a puppeteerBrowserinstance you can pass that in. pull#36 Thanks @stereobooster -
Errors thrown if any necessary
.cssdownload can't be found. pull#27 Thanks @stereobooster -
New repeatable string argument
--skipto cli to selectively skip downloading certain URLs. pull#31
-
Ability to pass a function
skippablewhich can help cancel certain network request. pull#20 Thanks @stereobooster -
Option to actually load images if you need it to. #26
-
Don't choke on
blob:stylesheet link objects. Thanks @stereobooster -
Use
TypeScriptto do type checking for development. Thanks @stereobooster
- Correctly ignore all request that are images by extension.
- Important fix for parsing all media queries.
-
The main
minimizefunction returns an object (which contains.finalCss) instead of just the CSS. Useful to be able to see the stylesheets it parsed. -
debugoption which adds allconsole.logthat happens tostdout. Off by default. -
Upgrade to css-tree 1.0.0-alpha24
-
List of "dead obvious" selectors that don't need to be analyzed like
*,body, andhtml. -
Clean up repeated important-comments in the concatenated CSS.
-
Updated README with example how to use a
catch.
- Trivial package refactoring.
- Better error handling on failed page navigation
- Basic CLI working.