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

Fix overriding baseURL #28

Merged
merged 3 commits into from
Jul 18, 2016
Merged

Fix overriding baseURL #28

merged 3 commits into from
Jul 18, 2016

Conversation

jgoclawski
Copy link
Contributor

Partially fixes #27 by allowing to override baseURL, which is being removed from ember-cli 2.7 (currently in beta).

@rwjblue
Copy link
Member

rwjblue commented Jul 6, 2016

This looks like a good refactor, but you mentioned that it only partially fixes things. What are the remaining issues?

@jgoclawski
Copy link
Contributor Author

Well, I think that this addon probably shouldn't use baseURL at all, right? I mean in the long run, as it's being deprecated and will eventually be removed from ember-cli.
http://emberjs.com/blog/2016/04/28/baseURL.html

This PR only allows to override it, which didn't fully work before :) My primary goal was to remove baseURL from my ember-cli config, which broke this addon.

@jgoclawski
Copy link
Contributor Author

jgoclawski commented Jul 18, 2016

Hi, just a friendly ping. This commit is just a fix, so I think it can be easily merged and released.

The idea of not using baseURL at all should be a separate topic. Meanwhile this fix allows running live reload in Ember CLI 2.7 with custom rootURL (not equal to "/"). Otherwise it doesn't work.

@rwjblue
Copy link
Member

rwjblue commented Jul 18, 2016

Ya, this change looks good, but we need to figure out the root issue (pun intended).

@nathanhammond
Copy link

For rootURL this should be the end result that just works:

// maintaining `baseURL` for backwards compatibility. See: http://emberjs.com/blog/2016/04/28/baseURL.html
var baseURL = options.liveReloadBaseUrl || options.rootURL || options.baseURL;

@@ -28,13 +28,14 @@ module.exports = {
var self = this;
var app = config.app;
var options = config.options;
var baseURL = options.liveReloadBaseUrl || options.baseURL;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you switch this to options.liveReloadBaseUrl || options.rootURL || options.baseURL?

@rwjblue
Copy link
Member

rwjblue commented Jul 18, 2016

Thanks for chiming in @nathanhammond. One small tweak and we should be good here...

@jgoclawski
Copy link
Contributor Author

Thanks for taking time to look into it. I've updated the PR according to your suggestions. There are 3 commit now, each clearly showing it's purpose.

@rwjblue rwjblue merged commit 5cbe83e into ember-cli:master Jul 18, 2016
@rwjblue
Copy link
Member

rwjblue commented Jul 18, 2016

Thank you!

@jgoclawski jgoclawski deleted the patch-1 branch July 18, 2016 17:17
@rwjblue
Copy link
Member

rwjblue commented Jul 18, 2016

Published

@jgoclawski
Copy link
Contributor Author

Thanks!

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.

baseURL is being removed from ember
3 participants