S
S
smithana2017-10-23 15:09:09
Apache Cordova
smithana, 2017-10-23 15:09:09

How to quickly view code edits in Cordova?

Good afternoon,
I'm getting acquainted with Cordova.
I collect the usual layout using Gulp + BrowserSync.
I built a test application in Cordova, chose the Browser platform.
Ran cordova run and saw test case in browser. I made changes to the code, saved the file, pressed F5 in the browser, the page was refreshed, but there are no my edits.
restarted cordova run - the example ran again and my edits were.
I tried to tie BrowserSync using this plugin https://github.com/nparashuram/cordova-plugin-brow...
Everything was installed, assembled, but code changes are still not displayed.
I began to dig deeper and saw that I was not the only one who faced such a problem.
It turns out that Cordova is running on port 8000, and BrowserSync is running on port 3000. And if we change 8000 to 3000, then we will not see our test Index.html.
Accordingly, the question is, how do you debug your code?
Do you restart cordova run every time? Or do you first layout as a regular site, and then build it once in Cordova?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
Y
Yaroslav Rostanets, 2017-10-23
@djarik

1. I recommend PhoneGap Developer . You can immediately see the changes either on a real device or on an emulator.
2. Why is there a hapl during development? It is better then to collect everything. So it just gets in the way.
PS Highly recommend jumping to React Native

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question