Developing Composer packages locally using DrupalVM

BLT is a Composer package that acts as a development and testing framework for Drupal sites. I do a lot of work on BLT, so I need a way to hack on it locally while also seeing the real-time effects on a Drupal installation.

All of my Drupal / BLT sites also use DrupalVM for the local development environment, which actually makes this a pretty easy task.

Let's say that my local git checkout of BLT is at /my/package/location. All I have to do is define a new NFS mount for DrupalVM like so (in box/config.yml):

+  - local_path: /my/package/location
+    destination: /var/www/my_site/vendor/acquia/blt
+    type: nfs

Now my local checkout of BLT (on my host machine) is mounted as a composer dependency inside the VM, so any changes I make will be reflected immediately on the Drupal site. Obviously you just have to be careful not to run any Composer operations (update/install) while this is mounted.