Skip to content
This repository has been archived by the owner on Apr 23, 2022. It is now read-only.

Add option to automatically create symlink on host-side to improve experience in IDEs and other applications #1

Open
claygriffiths opened this issue Sep 11, 2016 · 4 comments

Comments

@claygriffiths
Copy link
Contributor

No description provided.

@afragen
Copy link

afragen commented Sep 11, 2016

Background: a synced folder in Vagrant displays as an empty directory. While it works great for a working representation of your plugin or theme it does not allow for editing.

If, after creating the synced folder, a symlink is created in place of the synced folder, it is now possible to edit the plugin/theme in your IDE.

@afragen
Copy link

afragen commented Sep 17, 2016

BTW, this exchange from synced folder to symlink must occur every time Pressmatic would normally run the Volumes add-on. So after a restart, volume remap, etc.

Each individual entry would need a checkbox to create a symlink.

The flow would likely be something like the following.

  1. Delete the symlink in the Container Destination
  2. Create/Re-create the synced folder from Host Source to Container Destination
  3. Delete the synced folder in Container Destination
  4. Create symlink from Host Source to Container Destination

Here's the code I used to use with VVV. I would have to run the shell script every time VVV reloaded, etc.

https://gist.github.com/afragen/549cc092a1f61c2a8d7c

@Ipstenu
Copy link

Ipstenu commented Feb 21, 2017

This is my biggest annoyance. I can symlink a folder, but it doesn't sync.

I'm using Local for development, and my workflow is now this:

  1. Edit code
  2. Run rsync script

Over and over :( It doesn't feel like it's a real symlink or an add-on volume so much as I can map a 'command'.

@afragen
Copy link

afragen commented Mar 7, 2017

I believe I have a working solution. It obviously requires modification to suit your personal needs.

https://gist.github.com/afragen/748e4780b6057d4c41cf9e466557042a

After the plugins or themes are added via the Volumes Addon, simply run this modified script and symlinks with replace the created synced folders that LbF creates.

@Ipstenu no more rsync

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

No branches or pull requests

3 participants