Integration of Grunt / Gulp and Livereload with an existing Apache server serving PHP / Zend

I am working on a PHP project using the Zend framework, which runs locally with Apache. Is there a plugin / configuration for Grunt / Gulp that will allow me to use this existing server and restart my browser when changes are made to my phtml / php, CSS and JavaScript files?

+4
source share
1 answer

Normal plugins live-reloadwill work fine. It works by running a separate server that simply reports changes - it does not serve your code directly.

gulp, gulp-livereload README LR. LR-, , LR- , .

, , LR- , gulp ( grunt) .

.

  • ( , ), gulp-embedlr, script HTML PHP .

  • PHP, script PHP, dev. embedlr, :

    <script type="text/javascript">document.write('<script src="//localhost:35729/livereload.js?snipver=1" type="text/javascript"><\/script>')</script>
    

    Obvisouly, , LR, .

  • , dev , , ( ), LiveReload. / / /. , , .

+8

Source: https://habr.com/ru/post/1531643/


All Articles