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

best way to avoid code duplicate between project #840

Open
StoryDevOffical opened this issue Dec 9, 2021 · 1 comment
Open

best way to avoid code duplicate between project #840

StoryDevOffical opened this issue Dec 9, 2021 · 1 comment

Comments

@StoryDevOffical
Copy link

Hi,

First, thanks for this awesome tool.
Now, I am asking what is the best way to include a project in another without to duplicate code.
I found some manners like use python, but there ... maybe there are good practices about.

best regards,
story

@ethagnawl
Copy link
Member

ethagnawl commented Dec 10, 2021

Hi, @StoryDevOffical.

This functionality isn't currently supported by tmuxinator or Yaml. However, if/when PR #652 lands, that should solve the same problem from a different angle.

Otherwise, I haven't ever seriously tried to do this, but you may be able to use ERB in your project's config file to inject Yaml snippets. YMMV, but something like:

# /home/user/.config/tmuxinator/two.yml

name: two
windows:
  - other_editor:
      layout: main-vertical
      panes:
        - echo "hi from two!"
# /home/user/.config/tmuxinator/one.yml

name: one
windows:
  <%= IO.read("./two.yml") %>
  - editor:
      layout: main-vertical
      panes:
        - echo "hi from one!"

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