-
Notifications
You must be signed in to change notification settings - Fork 363
Add Browsersync for mobile development testing #712
Conversation
f6be348
to
998dd6d
Compare
I've given this a run locally and it seems to work well on my desktop like it usually was. I can access the site via the browser sync url on my phone and that works but i don't get the assets. The error i'm getting is a |
Just to add to this if i update my local domain to be my internal IP i.e. |
To add to this. In IE11 everything seems to be working okay but the scripts aren't being loaded. The line is there but they don't seem to appear in the network tab so not quite sure what's going on. Could be a defer issue that isn't necessarily related to this. |
Good to see this being close. Will try to lend a hand and test tomorrow and
see why the UI isnt working.
On Fri, Aug 24, 2018 at 8:11 AM Thomas Kelly ***@***.***> wrote:
[image: image 1]
<https://user-images.githubusercontent.com/4837696/44592206-ed675680-a78d-11e8-8c04-1df864a86c60.png>
What are you trying to accomplish with this PR?
Fixes #594 (comment)
<#594 (comment)>
Adds Browsersync so that your development store with assets being served
from your local asset server is accessible to other devices on your local
network.
TODO
- Validate if the Browsersync UI is working. I have tried to load it
on my dev machine but the connection is failing for some reason...
------------------------------
You can view, comment on, or merge this pull request online at:
#712
Commit Summary
- Add Browsersync for mobile development testing
File Changes
- *M* packages/slate-tools/cli/commands/start.js
<https://github.com/Shopify/slate/pull/712/files#diff-0> (73)
- *M* packages/slate-tools/package.json
<https://github.com/Shopify/slate/pull/712/files#diff-1> (2)
- *M* packages/slate-tools/slate-tools.config.js
<https://github.com/Shopify/slate/pull/712/files#diff-2> (2)
- *R* packages/slate-tools/tools/asset-server/app.js
<https://github.com/Shopify/slate/pull/712/files#diff-3> (0)
- *R* packages/slate-tools/tools/asset-server/client.js
<https://github.com/Shopify/slate/pull/712/files#diff-4> (4)
- *A* packages/slate-tools/tools/asset-server/index.js
<https://github.com/Shopify/slate/pull/712/files#diff-5> (94)
- *M* packages/slate-tools/tools/dev-server/index.js
<https://github.com/Shopify/slate/pull/712/files#diff-6> (112)
- *D* packages/slate-tools/tools/dev-server/ssl/index.js
<https://github.com/Shopify/slate/pull/712/files#diff-7> (14)
- *A* packages/slate-tools/tools/utilities/index.js
<https://github.com/Shopify/slate/pull/712/files#diff-8> (24)
- *R* packages/slate-tools/tools/utilities/server.pem
<https://github.com/Shopify/slate/pull/712/files#diff-9> (0)
- *M* yarn.lock
<https://github.com/Shopify/slate/pull/712/files#diff-10> (557)
Patch Links:
- https://github.com/Shopify/slate/pull/712.patch
- https://github.com/Shopify/slate/pull/712.diff
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
<#712>, or mute the thread
<https://github.com/notifications/unsubscribe-auth/ACGRE48bzctC6CF9Fao7NatZ4sZN-p86ks5uUBengaJpZM4WLhvb>
.
--
Sent from my iPhone. Excuse the typos.
|
Nope.
I'll take a look.
Shouldn't need to do this. @dan-gamble are you accessing your dev store externally via the |
If I add:
to the browswersync config, the UI loads on |
Hey @t-kelly. I was accessing the site via |
Hi Thomas, I should've clarified my findings a bit more. The IE11 also works totally fine until the |
@dan-gamble I was hoping |
Okay -- I've done some more work. Slate will now default to using your local IP address to reference assets instead of I now do a check when firing up the dev environment to see if your local IP is public or private. If it is private we can use it securely for external testing. If it is public, the CLI recommends you continue with external testing disabled because it's not a good idea to post your public IP on a live Shopify store. Final test to see if it works? I'll do a code cleanup after because I've made a mess of things now :/ |
I'll give this a go Monday or if i find time this weekend while moving i'll give it a quick run :) |
const env = require('@shopify/slate-env'); | ||
const {event} = require('@shopify/slate-analytics'); | ||
|
||
const promptContinueIfPublishedTheme = require('../prompts/continue-if-published-theme'); | ||
const promptSkipSettingsData = require('../prompts/skip-settings-data'); | ||
const promptDisableExternalTesting = require('../prompts/confim-private-ip'); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There's a typo on this file (confim => confirm
)
packages/slate-tools/package.json
Outdated
@@ -56,8 +57,10 @@ | |||
"jest": "22.4.2", | |||
"minimatch": "^3.0.4", | |||
"minimist": "1.2.0", | |||
"node-ip": "^0.1.2", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think this is meant to be "ip": "^1.1.5",
or the prompts/confim-private-ip.js
needs to have it's require()
change.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes! Got mixed up there. Thanks.
Can't really fully test this on IE11 as i can't work out how to visit a |
8d13767
to
0ba97b6
Compare
@dan-gamble I gave IE11 a crack and everything seemed to work fine after visiting |
0ba97b6
to
25810f0
Compare
I'll give it another go, awesome PR though @t-kelly. Thanks a ton for getting this in and prioritising it. |
Thanks so much for this feature @t-kelly this will be tremendously useful. Update: One thing I'm noticing with beta 7, is that the refresh actually takes a few seconds more. While before it was pretty much instant, now it takes anything between 3 to 6 seconds for the browser to receive the updates. |
This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs. |
What are you trying to accomplish with this PR?
Fixes #594
Adds Browsersync so that your development store with assets being served from your local asset server is accessible to other devices on your local network.
TODO
I have tried to load it on my dev machine but the connection is failing for some reason...UPDATE: Looks to be caused by Https and open ui > panel empty (no url) BrowserSync/browser-sync#1152