43081j / postcss-lit

PostCSS syntax for extracting CSS from template literals inside JS/TS files
84 stars 6 forks source link

feat: implement syntax stringifier #5

Closed 43081j closed 2 years ago

43081j commented 2 years ago

I have implemented a basic stringifier which rebuilds the original expression text.

In order to retrieve the original text, we have to make use of raws on the root node it seems. This could be replaced if some other plugin decides to mutate our placeholder comments, so in those cases we will leave the comments as-is.

~CURRENTLY BLOCKED: This depends on postcss/postcss#1675 being merged and released.~

BLOCKED BY: postcss/postcss#1681

43081j commented 2 years ago

postcss 8.4 is out, which now has stringifier types... but i missed the builder member out of the types 🤦‍♂️

i've opened postcss/postcss#1681 which now blocks this

coveralls commented 2 years ago

Pull Request Test Coverage Report for Build 1504286696


Files with Coverage Reduction New Missed Lines %
lib/parse.js 1 94.03%
<!-- Total: 1 -->
Totals Coverage Status
Change from base Build 1484517775: 1.6%
Covered Lines: 364
Relevant Lines: 368

💛 - Coveralls
coveralls commented 2 months ago

Pull Request Test Coverage Report for Build 1504286696

Warning: This coverage report may be inaccurate.

This pull request's base commit is no longer the HEAD commit of its target branch. This means it includes changes from outside the original pull request, including, potentially, unrelated coverage changes.

Details


Files with Coverage Reduction New Missed Lines %
lib/parse.js 1 94.03%
<!-- Total: 1 -->
Totals Coverage Status
Change from base Build 1484517775: 1.6%
Covered Lines: 364
Relevant Lines: 368

💛 - Coveralls