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

Set load path from gem instead of using install generator #139

Open
Spone opened this issue Mar 26, 2019 · 3 comments
Open

Set load path from gem instead of using install generator #139

Spone opened this issue Mar 26, 2019 · 3 comments

Comments

@Spone
Copy link
Collaborator

Spone commented Mar 26, 2019

Following #121 and #136, what about calling this line:

config.paths.add "frontend/components", eager_load: true

directly from the gem instead of adding it to config/application.rb when running the install generator.

Let's make a list of advantages and potential drawbacks!

@florentferry
Copy link
Member

florentferry commented Mar 28, 2019

If you load it directly from gem, you loose advantage of changing default root path (https://github.com/komposable/komponent#change-default-root-path). But maybe not an issue to remove that option ?

@Spone
Copy link
Collaborator Author

Spone commented Mar 28, 2019

Can't we use the Rails.application.config.komponent.root value in config.paths.add in case it's called from the gem?

@nicolas-brousse
Copy link
Member

It's what

app.config.paths.add app.config.komponent.root.to_s, eager_load: true
does, no?

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

No branches or pull requests

3 participants