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

Namespace helper methods for css:build command #132

Merged
merged 1 commit into from
Sep 13, 2023

Conversation

excid3
Copy link
Contributor

@excid3 excid3 commented Sep 13, 2023

Methods defined in Rake files are added to the global namespace. This means cssbundling-rails and jsbundling-rails using the same build_command method name get overridden by one or the other.

This introduces a module to namespace these methods and provides a place for any future methods to be defined.

Since these only apply to the tasks in build.rake, I just defined the module there, but we could extract it to a file and require it instead.

Fixes #131

cc @terracatta

@excid3
Copy link
Contributor Author

excid3 commented Sep 13, 2023

@rafaelfranca heads up on this and rails/jsbundling-rails#172 👍

@terracatta
Copy link
Contributor

Thanks @excid3 TIL that methods defined here are in a shared namespace with all other rake tasks. I've updated my open PRs as well. hotwired/turbo-rails#494 and hotwired/stimulus-rails#125.

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.

Regression: Rake task methods override each other
3 participants