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

Add tokens to output #17

Closed
wants to merge 1 commit into from
Closed

Add tokens to output #17

wants to merge 1 commit into from

Conversation

irudoy
Copy link

@irudoy irudoy commented Apr 17, 2019

This PR adds the ability to get raw tokens of cleaned CSS.
For example, you can extract all used selectors from it.

@leeoniya
Copy link
Owner

leeoniya commented Apr 17, 2019

in general, i was considering returning some form of the tokens (#7) but not in the raw mutable, unfiltered internal format which is optimized for selector testing but not great for consumption. i don't think a flat structure is ideal either.

feel free to open an issue please use #7 to discuss the output format and what should be the option that triggers its generation (i don't want to take the perf hit of generating it unconditionally).

@leeoniya leeoniya closed this Apr 17, 2019
@leeoniya
Copy link
Owner

@irudoy

you might be interested to know that v1.0.7 now returns {css, sels} where sels is a Set of all retained selectors. also somewhat related is whitelist accumulation: https://github.com/leeoniya/dropcss#accumulating-a-whitelist

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants