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 a flag to allow "non-strict" mode #7

Closed
derekstavis opened this issue Jan 26, 2017 · 3 comments
Closed

Add a flag to allow "non-strict" mode #7

derekstavis opened this issue Jan 26, 2017 · 3 comments

Comments

@derekstavis
Copy link

derekstavis commented Jan 26, 2017

I like the idea of automatic Ramda imports, but it makes a lot of sense for me having functions names like find on my models, for example. Because of this issue I'd like to propose an addition query to configure this loader to not automatically add imports.

I have implemented this as strict=false. This way, we can still have Ramda debugging facilities while not adding global imports.

What do you think about?
Thanks!

@orther
Copy link

orther commented Feb 23, 2017

I have an existing codebase with several other developers that would benefit from the debugging facilities but not the automatic import. We automatically provide ramda in the global scope on demand with webpack ProviderPlugin and use R. prefix.

Are you willing to add a flag to disable global imports?

@dumconstantin
Copy link
Owner

dumconstantin commented Mar 4, 2017

Hi guys,

Sorry for the late response. Sure, it makes a lot of sense.

@derekstavis Do you have a fork with the strict=false flag implemented? If so, you could make a pull request and I'll merge it. Otherwise I'll get that implemented.

@orther Sure, I'll implemented a imports=true | false flag.

Thanks!

@dumconstantin
Copy link
Owner

I've added both flags in v 0.5.0.

I'm closing this as it solves @derekstavis issue.

However, I realized that your issue @orther is not solved by the imports flag as you need ramda-loader to detect fn calls that have the R namespace.

To this end, I've created #9 to address just this.

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

No branches or pull requests

3 participants