-
Notifications
You must be signed in to change notification settings - Fork 9
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Enhancement/issue 763 custom css minification and bundling (#980)
* Enhancement/issue 971 refactor bundling and optimizations (#974) * add cloud IDE caveat to puppeteer renderer plugin readme (#967) * init commit of refactoring for script tags with a src * initial CSS optimizing * sync optimized link tags in final output * refactored for shared reources * handle inline script bundling * support serving custom resources using Greenwood plugins in Rollup configuration without needing extra rollup plugin * non resource related Rollup plugins supported * custom resource plugins and rollup plugins working together * handle empty input for Rollup * updated lock file * handle inline style tag bundling and optimizing * default optimization spec passing * refactor merging app and page templates * clarifying corrections in spec files * inline optimization config working * none optimization support * none optimization support * none and static optimization overrides * refactor html rendering and optimizing * refactoring and more CLI specs passing * add missing variable * SSR specs and optimizing resource bundling * minor refactoring and logging * resolving some plugin specs * restore develop command related GraphQL specs * custom graphql query spec * all specs passing * drop rollup plugin deps from import typescript plugin * all Greenwood commands and specs passing * restore static router with custom prerender * restore postcss-import * refactor shared resources to a Map and handle dupes * restore local packages workaround for local Rollup bundling * better monorepo Rollup facade modules detection * switch console log * remove console logging * update plugin related docs * local solution for windows support * refactor errant object assign * full cross platform URL support * fix lint * fix extra bundles when custom prerendering * clean up stale or already tracked TODOs * add nested head tag smoke tests * check for app template validation for HUD display * misc refactoring and TODOs cleanup * restore static router (again) * standardize passing correct reference for prerender scripts * clean up data-gwd-opt markers from final HTML * v0.27.0-alpha.0 * (WIP) swap PostCSS in CLI with custom AST solution * refactor website CSS * basic implementation of minified CSS from AST * support relative @import statements * refactor AST parsing to recursive function * support deeply nested @import and CSS custom properties * fix missing declaration semicolon * correctly close Rule brackets * general on leave refactoring * more selector support * all specs passing * support percentage * test for percentage * support url and @import url * add important support * custom implementation for handling matchers in attribute selectors * restore website prism styles * nth and lang selectors support * improve support for matching selector types * add error logging for CSS parsing
- Loading branch information
1 parent
ce58b72
commit 9e792ae
Showing
21 changed files
with
396 additions
and
552 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
43 changes: 43 additions & 0 deletions
43
packages/cli/test/cases/build.config.optimization-default/fixtures/expected.css
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
:root,:host{--primary-color:#16f;--secondary-color:#ff7;} | ||
|
||
@font-face {font-family:'Source Sans Pro';font-style:normal;font-weight:400;font-display:swap;src:local('Source Sans Pro Regular'),local('SourceSansPro-Regular'),url('/assets/fonts/source-sans-pro-v13-latin-regular.woff2')format('woff2'),url('/assets/fonts/source-sans-pro-v13-latin-regular.woff')format('woff'),url('/assets/fonts/source-sans-pro-v13-latin-regular.ttf')format('truetype');} | ||
|
||
*{margin:0;padding:0;font-family:'Comic Sans',sans-serif;} | ||
|
||
body{background-color:green;} | ||
|
||
h1,h2{color:var(--primary-color);border:0.5px solid #dddde1;} | ||
|
||
#foo,.bar{color:var(--secondary-color);} | ||
|
||
div>p{display:none;} | ||
|
||
a[title]{color:purple;} | ||
|
||
@media screen and (max-width:992px){body{background-color:blue;}} | ||
|
||
p::first-line{color:blue;width:100%!important;} | ||
|
||
pre[class*='language-']{color:#ccc;background:none;} | ||
|
||
dd:only-of-type{background-color:bisque;} | ||
|
||
:not(pre)>code[class*='language-']{background:#2d2d2d;} | ||
|
||
li:nth-child(-n+3){border:2px solid orange;margin-bottom:1px;} | ||
|
||
li:nth-child(even){background-color:lightyellow;} | ||
|
||
li:nth-last-child(5n){border:2px solid orange;margin-top:1px;} | ||
|
||
dd:nth-last-of-type(odd){border:2px solid orange;} | ||
|
||
p:nth-of-type(2n+1){color:red;} | ||
|
||
*:lang(en-US){outline:2px solid deeppink;} | ||
|
||
p~ul{font-weight:bold;} | ||
|
||
a[href*='greenwood'],a[href$='.pdf']{color:orange;} | ||
|
||
[title~=flower],a[href^='https'],[lang|=en]{text-decoration:underline;} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.