سؤال

I'm just trying implement grunt.js and livereload to a project that I currently already have running on my localhost. I just wanted to know if its at all possible to have grunt/watch running to refresh a server that is already running on my localhost, rather than having it create a new one?

From the github page I found "If enabled a live reload server will be started with the watch task per target. Then after the indicated tasks have ran, the live reload server will be triggered with the modified files."

هل كانت مفيدة؟

المحلول

Livereload is deprecated, use watch. (if livereload is this)

Watch just check is page content changed and if it's true calling "reload" content in you page in browser.

If you want to restart localhost server you can use command line from grunt file (which is nodejs file). See require('child_process').exec function for more information

مرخصة بموجب: CC-BY-SA مع الإسناد
لا تنتمي إلى StackOverflow
scroll top