Skip to content

add tokens to processCss function #94

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

Closed
wants to merge 1 commit into from

Conversation

nescalante
Copy link

Hi all! 🤚
I am doing some hack with the css-modules-require-hook lib.
For my use case, I am needing to receive the tokens generated in the processCss function and then do some hack with that.
My first obstacle there is that it wasn't as easy as adding tokens to the processCss function since after that call, you are doing the camelCase transformation, so I had to move the processCss function where the hook happens and then do some refactor there to achieve that.
My second obstacle was that (I don't know why) you are doing m._compile(module.exports = ${JSON.stringify(tokens)}, filename); to return the tokens, and for my use case I was needing to add a function to that tokens. So I changed it to just module.exports == tokens. If you have a solid reason to do this compile, please let me know.

Let me know if this changes looks of for you and also if you need some change from my side.
Thanks in advance for your time. 👋

@nescalante
Copy link
Author

is this repo still being maintained?

@nescalante
Copy link
Author

Closing since outdated

@nescalante nescalante closed this Mar 11, 2019
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.

1 participant