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

Export buildStyles from module and not just as bin script #21

Open
aparlato opened this issue Mar 3, 2023 · 3 comments
Open

Export buildStyles from module and not just as bin script #21

aparlato opened this issue Mar 3, 2023 · 3 comments

Comments

@aparlato
Copy link
Contributor

aparlato commented Mar 3, 2023

We have reports from a client that this repo doesn't export the buildStyle function when used in node. It works fine as a binary script.

It should export fine as a module, but if it's not, it may be an issue with parcel as our bundler.

[EDIT] See #21 (comment)
Should we export buildStyles (plural) as a JS function from the module instead of only making this available as a bin script?

@ebrelsford
Copy link
Contributor

I'd be interested to know more about what the user is doing and what isn't working.

I created a bare minimum node package, added mapbox-gl-style-build as a dependency, and imported buildStyle. This all works fine on my end. I'm not actually trying to build styles with it yet but I can definitely see and invoke buildStyle.

@aparlato
Copy link
Contributor Author

aparlato commented Mar 7, 2023

My apologies, I just got clarification from the client on what they meant, so am updating the issue:

They wanted to know why we only export buildStyle and not buildStyles or effectively what the bin script is.

I don't feel too strongly about this if we did want to export that, but we would need a slightly different implementation from the bin script.

@aparlato aparlato changed the title Does not work in node Export buildStyles from module and not just as bin script Mar 7, 2023
@ebrelsford
Copy link
Contributor

Oh got it. I'm not opposed to it. Either way we should document that those functions are exported.

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

No branches or pull requests

2 participants