Add Vagrant environment specific config support #95
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Problem
Designers and developers often use Butler in different environments. Designers prefer to work locally for the increased speed, while developers work within Vagrant for Drupal support. Unfortunately, there is no easy way to differentiate this environment when running Butler. As a result, the URL in the
config.yml
file must be changed from something likelocalhost:4000
toproject-name.local:4000
when the environment switches. This can be tedious to change and to avoid committing.Proposed Solution
This PR adds a special Gulp task named
butler-vagrant
for running Butler within Vagrant. It executes Spress with config for a new Vagrant environment located in theconfig_vagrant.yml
file.It adds a task to Gulp named
spress-serve-vagrant
to serve content at the appropriate URL.Next steps
Spress is supposed to allow per-environment configuration. We previously had a
config_dev.yml
file. I couldn't get Spress to acknowledge the config in this file, but everything worked when I changed the environment fromdev
tovagrant
.I currently have the
develop-vagrant
tasks defined in thebutler.defaults.js
file that is included in a project's overrides of the butler defaults. I don't believe this is the best place for it, but I wasn't sure where else to place it. Here is that code: