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

Handle $dist_path as var #1352

Merged
merged 4 commits into from Mar 3, 2015
Merged

Handle $dist_path as var #1352

merged 4 commits into from Mar 3, 2015

Conversation

emaildano
Copy link
Contributor

Based on this thread: https://discourse.roots.io/t/sage-and-augmenting-my-workflow/2965/3

This sets up the opportunity to change the path of dist/ for those needing to reference a different build.

Based on this thread: https://discourse.roots.io/t/sage-and-augmenting-my-workflow/2965/3

This sets up the opportunity to change the path of `dist/` for those needing to reference a different build.
@austinpray
Copy link
Contributor

wait what? where does $dist_path come from?

@austinpray austinpray closed this Feb 26, 2015
@emaildano
Copy link
Contributor Author

https://github.com/roots/sage/blob/master/lib/assets.php#L56

$dist_path was already in the file. How would one change the path if the build is something other than dist/?

@austinpray austinpray reopened this Feb 26, 2015
@austinpray
Copy link
Contributor

Did you test this? It doesn't work. $dist_path is defined as such: $dist_path = get_template_directory_uri() . '/dist/';. there would need to be a separate variable $dist_dir or something. because the get_template_directory_uri will break stuff

@emaildano
Copy link
Contributor Author

@austinpray: I see what you mean. However it was working locally.

The change I made should work fine.

Personally my build will go to dist-prod/ which will be checked into git and I'm adding a condition to target that in production. Here's just an example:

if (WP_ENV == 'production') {
  $dist_var = '/dist-prod/';
} else {
  $dist_var = '/dist';
}

@austinpray
Copy link
Contributor

Not super about a variable named $dist_var haha
emaildano#1

retlehs added a commit that referenced this pull request Mar 3, 2015
@retlehs retlehs merged commit 6a9e437 into roots:master Mar 3, 2015
retlehs added a commit that referenced this pull request Mar 3, 2015
@emaildano emaildano deleted the patch-2 branch March 4, 2015 14:28
@retlehs retlehs mentioned this pull request Oct 11, 2015
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

Successfully merging this pull request may close these issues.

None yet

3 participants