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

nodejs only, it seems #38

Open
btmurrell opened this issue Feb 1, 2023 · 1 comment
Open

nodejs only, it seems #38

btmurrell opened this issue Feb 1, 2023 · 1 comment
Labels
enhancement New feature or request

Comments

@btmurrell
Copy link

this convert function goes right into depending on path.basename which means it is nodejs only. your doc says in the first example, it takes a css string as one variant of param 1. that's what i am passing (a css string) but it is trying to load a file. 😢

@eddhurst
Copy link
Member

eddhurst commented Feb 2, 2023

Hi @btmurrell, thanks for reaching out. Yes it looks like you are accurate, the convert function allows both direct string conversion and file input, and the way it differentiates between the two uses path.basename to derive whether the input is a filename string or a CSS string You can see this here: https://github.com/americanexpress/css-to-js/blob/main/src/index.js#L32

As we don't currently expose the API directly, having a dependency on path is currently a requirement.

Could you provide a bit more context on your environment and usecase so we can discuss your requirements during our next planning session.

@eddhurst eddhurst added the enhancement New feature or request label Feb 2, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants