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

refactor(grunt:ripple): remove superfluous cordova prepare #62

Closed
wants to merge 1 commit into from
Closed

refactor(grunt:ripple): remove superfluous cordova prepare #62

wants to merge 1 commit into from

Conversation

mmrko
Copy link
Contributor

@mmrko mmrko commented Jun 26, 2014

Ripple executes cordova prepare internally on browser refresh (see node_modules/ripple-emulator/lib/server/emulate/hosted.js). Thus, it's not necessary to call the Grunt prepare task to move files from www/ to the respective platform www directories.

Ripple executes cordova prepare command internally on browser refresh (see
node_modules/ripple-emulator/lib/server/emulate/hosted.js). Thus, it's not
necessary to call the prepare task via Grunt to move files in www/ to the
respective platform www directories..
@diegonetto
Copy link
Owner

@mmrko did you test this? You are correct that Ripple runs cordova prepare for you, but you must re-run ripple emulate if you want to be able to see changes. My findings are consistent with the note on this blog post - http://www.raymondcamden.com/2013/11/5/Ripple-is-Reborn

A caveat to the first note. When you edit your code, you do not need to run cordova prepare. Ripple does it for you. But you do need to rerun "ripple emulate" to refire the simulator. If you just reload the browser tab it won't show the latest changes. So you have a choice. You can either keep running "ripple emulate", or do "cordova prepare" in another Terminal tab so you can reload the same tab.

Thus, removing the prepare task like you did, editing a file, then refreshing the browser tab Ripple is running on does not work.

@diegonetto
Copy link
Owner

@mmrko I went ahead and removed the prepare statement from the initial task list, but for it to work as intended it needs to remain a watch task, as mentioned above f5d6d23

@mmrko
Copy link
Contributor Author

mmrko commented Jul 12, 2014

Oh, my bad! It indeed seems so that the internal cordova prepare is run only on full page reload, mere ⌘ + R doesn't seem to cut it.

@mmrko mmrko deleted the refactor-grunt-ripple branch July 12, 2014 19:44
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.

2 participants