Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Enhancement/issue 971 refactor bundling and optimizations #974

Conversation

thescientist13
Copy link
Member

@thescientist13 thescientist13 commented Aug 17, 2022

Related Issue

resolves #971 and #581 (related to #970 and also ties into #550 )

Summary of Changes

General strategy revolved around reducing duplicate work and make more of the business logic "first party"

  1. Refactoring rollup.config.js to do more work of the in bundle lifecycle re-using the optimization lifecycles of resource plugins
  2. Consolidate used resources into a single data structure as part of the compilation
  3. Now for example, no special Rollup plugin needed for transforming JSON, CSS
  4. Resolves inline optimization of styles

Some of the "breaking" changes actually help fix bugs too

TODO

  1. Need to handle optimization configurations and specs
  2. Validate that we can re-use all our resources for support resource plugin based transformations for standard module formats (ex: import JSON, CSS) for SSR #878 as ESM, and so maybe wouldn't need plugins for Rollup at all in that case?
    • Got this working for Import JSON plugin ✅
  3. Get all CLI specs * (not including SSR specs, to be refactored 👇 )
  4. Refactor SSR bundling (see avoid Rollup double bundling for pre-bundled static assets for server routes #883 )
  5. Get all plugin specs passing
  6. Refactor all "import" related plugins to not need specialized Rollup plugins, update package.json etc
  7. Make sure website is building correctly (develop / build / serve)
  8. Static router not loading
  9. Missed postcssImport optimizing in standard CSS plugin
  10. hundreds of inputs for Rollup for www build, need to dedupe what goes into resources before it goes into Rollup?
  11. handle missing optimizedFileContents, like from lib/router.js (restore local project work around)
  12. Netlify build failing?
  13. Update documentation / plugin READMEs as needed
  14. Fix Windows build / normalize cross-platform key / pathname setting (e.g. /C:/)
  15. Getting extra output bundles compared to prod with puppeteer prerendering?
  16. Static router not loading (again)
  17. Windows build failing (again 😅 )
  18. Refactor / TODOs
    • Need to align on how Lit polyfill bundling is handled (once in CLI and once in the plugin it seems...) - see create Lit specific polyfill plugin #728
    • clean up all gwd-data-opt=* markers from HTML
    • optimize should reuse body
    • add node_modules specific tests to import CSS and JSON plugins
    • have HUD check both valid app and page body roots
    • have plugins filter on contentType
    • "real" hashString function
    • misc code TODOs
    • clean up scratch files in public folder
    • add smoke tests for nested head tags (e.g. there should be no <script> ... <script>...</script></script>
  19. Start this as the base of a new release branch (release/0.27.0)
  20. Track Hacktoberfest Good First Issues issue from leftover TODOs

Future Feature Smoke Testing (Nice To Have)

  1. Test against support resource plugin based transformations for standard module formats (ex: import JSON, CSS) for SSR #878 (also confirm version of NodeJS we should use)
  2. Validate PostCSS -> Parcel POC (CSS Bundling (and dropping PostCSS as core dependency) #763) - Enhancement/issue 763 parcel css bundling #977
  3. Test CSS Import Assertions - import attributes for standard module formats; CSS and JSON  #923

Thoughts / Questions

  • Should we use Map / Set more?
  • Re: Rollup, maybe it could be an undocumented API? Perhaps Alias plugins could also be solved by resource plugins?
  • Should we rethink default values / methods for ResourceInterface, maybe as part of Standardize on Web APIs (Request / Response / URL / etc) #948 ? Maybe intercept should be more clearly documented as more of a middleware style?
  • Continue to use string concat or lean into htmlparser (AST)? - conventional wisdom seems to be string manipulation is ideal
  • Call it a manifest.json instead of graph.json?
  • should optimize resource lifecycles take a url or body, or both? with a "hard" URL, you can get to a body, right? but what about chained optimizations? I think it should it always get a body from the calling point. So then it would need URL at all then?
  • Rename compile lifecycle?
  • rename imports field to resources in frontmatter?
  • Deprecate Rollup plugin? (maybe a grab bag RFC for sprint 9 to downshift away from a bundler per se, just use terser directly as the default?)
    • might still need it for things like replace, resolve, etc?
    • Move Rollup to JS plugin optimize lifecycle?
    • should we defer .js files to Greenwood resources too?

@thescientist13 thescientist13 added enhancement Improve something existing (e.g. no docs, new APIs, etc) Plugins Greenwood Plugins CLI labels Aug 17, 2022
@thescientist13 thescientist13 self-assigned this Aug 20, 2022
@thescientist13 thescientist13 added the documentation Greenwood specific docs label Sep 3, 2022
@thescientist13 thescientist13 changed the base branch from master to release/0.27.0 September 3, 2022 22:48
@thescientist13 thescientist13 marked this pull request as ready for review September 8, 2022 01:46
@thescientist13 thescientist13 reopened this Sep 8, 2022
@thescientist13 thescientist13 changed the base branch from release/0.27.0 to master September 8, 2022 01:48
@thescientist13 thescientist13 changed the base branch from master to release/0.27.0 September 22, 2022 12:02
@thescientist13 thescientist13 merged commit 700a3d9 into release/0.27.0 Sep 22, 2022
@thescientist13 thescientist13 deleted the enhancement/issue-971-refactor-bundling-and-optimizations branch September 22, 2022 12:18
@thescientist13 thescientist13 restored the enhancement/issue-971-refactor-bundling-and-optimizations branch September 22, 2022 12:46
@thescientist13 thescientist13 linked an issue Oct 15, 2022 that may be closed by this pull request
18 tasks
thescientist13 added a commit that referenced this pull request Nov 3, 2022
* 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
thescientist13 added a commit that referenced this pull request Nov 11, 2022
* 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
thescientist13 added a commit that referenced this pull request Nov 11, 2022
* 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
thescientist13 added a commit that referenced this pull request Nov 12, 2022
* 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
thescientist13 added a commit that referenced this pull request Nov 12, 2022
* 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
thescientist13 added a commit that referenced this pull request Nov 12, 2022
* 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
thescientist13 added a commit that referenced this pull request Nov 19, 2022
* 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
thescientist13 added a commit that referenced this pull request Nov 21, 2022
* 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

* experimental loaders for SSR custom resources

* set minimum nodejs v16.x requirement

* latest WIP

* custom SSR loaders for JSON

* working test case testing for SSR prerender with import CSS plugin

* experimental test task and github actions

* remove demo code

* add test cases for import JSON with prerendering

* upgrade latest gallinago

* enable experimental testing capabilities for CI

* post rebase reconsilations

* align versioning

* experimental specs passing on windows

* remove lint from experimental github actions

* refine exp test tasks

* minor refactor

* fix windows exp github action workflow

* increase mocha timeout for to accomodate exp test runs

* formatting

* updated import CSS and JSON plugin README docs

* SSR usage for experimental loaders
thescientist13 added a commit that referenced this pull request Nov 23, 2022
* 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
thescientist13 added a commit that referenced this pull request Nov 23, 2022
* 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
thescientist13 added a commit that referenced this pull request Nov 23, 2022
* 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

* experimental loaders for SSR custom resources

* set minimum nodejs v16.x requirement

* latest WIP

* custom SSR loaders for JSON

* working test case testing for SSR prerender with import CSS plugin

* experimental test task and github actions

* remove demo code

* add test cases for import JSON with prerendering

* upgrade latest gallinago

* enable experimental testing capabilities for CI

* post rebase reconsilations

* align versioning

* experimental specs passing on windows

* remove lint from experimental github actions

* refine exp test tasks

* minor refactor

* fix windows exp github action workflow

* increase mocha timeout for to accomodate exp test runs

* formatting

* updated import CSS and JSON plugin README docs

* SSR usage for experimental loaders
@thescientist13 thescientist13 deleted the enhancement/issue-971-refactor-bundling-and-optimizations branch December 18, 2022 01:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment