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

Allow third-party plugins to support bin/resolve <path> --eject #149

Open
pascallaliberte opened this issue Dec 7, 2022 · 0 comments
Open
Labels
enhancement New feature or request

Comments

@pascallaliberte
Copy link
Member

Because of the following lines in bin/resolve's functionality:

base_path = "bullet_train" + result[:absolute_path].partition("/bullet_train").last
# Try to calculate which package the file is from, and what it's path is within that project.
["app", "config", "lib"].each do |directory|
regex = /\/#{directory}\//
if base_path.match?(regex)

And:

if eject
if source_file[:package_name]

bin/resolve only allows ejecting files from packages starting with the bullet_train prefix.

Could this be changed to allow ejecting from a list of registered third-party plugins?

  • third-party plugin registers itself as a bullet_train plugin compatible with bin/resolve
  • bin/resolve checks that the base_path includes packages starting with that bullet_train prefix or from any of the registered plugin names
@pascallaliberte pascallaliberte added the enhancement New feature or request label Dec 7, 2022
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

1 participant