L
L
lukoie2019-01-11 05:34:07
local server
lukoie, 2019-01-11 05:34:07

How to livereload a project in php?

Well, I made up a project with the sass preprocessor. *
I decided to make a couple of pages, so I translated the bare html into php...
and now what?
VSCode doesn't reload, prepross doesn't reload.
While I launched the open server, and in the old fashioned way I will refresh the handles.
How is it usually done in this case?
And I immediately thought, if we preprocess, and there are all sorts of template engines, then maybe there is something like an html-include? so that it collects one html from parts, like sass _include?
* I stumbled upon a rake (with an optional closing of commenting, which in the end turned out to be not so optional), redid it to scss. Got enlightenment why scss is better. In it, too, I came across a misunderstanding, tk. docs say what to write@import 'topnavigation';but the assembler swears, and normally works out only @import '_topnavigation';and even VSCode (+Live Sass Compiler by Ritwick Dey) this _topnavigation.scss compiles to .css .min.css, although the docs say that sass is smart, sass just imports when compiling, and the underscore says that this file does not need to be processed.

photographic evidence
5c3812026af4b873040590.png5c3812ab8180e723460534.png

Can someone comment on the chzn?
zyzh, oh, a new trick - if you specify a variable in the main sass, then it is no longer understood in the imported file, and it is not compiled. interesting.

Answer the question

In order to leave comments, you need to log in

3 answer(s)
D
DevMan, 2019-01-11
@lukoie

VSCode doesn't reload, prepross doesn't reload.
I don’t know about vsc, but prepros and ancient liveload are calmly reloading for me.
maybe something like html-include?
any sane templating engine under puff supports includes.

F
Froggyweb, 2019-01-11
@Froggyweb

Make build on gulp
Use browsersync for reload https://webdesign-master.ru/blog/tools/601.html

L
ljutaev, 2019-01-11
@ljutaev

https://github.com/ahmadawais/WPGulp
just change the build for yourself

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question