linkedin / css-blocks

High performance, maintainable stylesheets.
http://css-blocks.com/
BSD 2-Clause "Simplified" License
6.33k stars 152 forks source link

Synchronous Block Factory #500

Closed chriseppstein closed 3 years ago

chriseppstein commented 3 years ago

We need to be able to load CSS Blocks synchronously. There will be a new Factory called the BlockFactorySync which implements the same API but all of the methods are synchronous. Under the covers this requires the BlockParser to support both sync and async parsing so it will provide different methods for parsing blocks based on the mode that is desired. The difference between Sync and Async loading centers around block imports and exports... all the rest of the code is synchronous.

This also requires us to create sync versions of our block importers and css preprocessors.