File tree Expand file tree Collapse file tree 1 file changed +18
-5
lines changed
symfony/framework-bundle/3.3 Expand file tree Collapse file tree 1 file changed +18
-5
lines changed Original file line number Diff line number Diff line change @@ -6,9 +6,22 @@ cache-warmup: cache-clear
6
6
@test -f bin/console && bin/console cache:warmup || echo " cannot warmup the cache (needs symfony/console)"
7
7
.PHONY : cache-warmup
8
8
9
- serve :
10
- @echo -e " \033[32;49mServer listening on http://127.0.0.1:8000\033[39m"
11
- @echo " Quit the server with CTRL-C."
12
- @echo -e " Run \033[32mcomposer require symfony/web-server-bundle\033[39m for a better web server"
9
+ CONSOLE =bin/console
10
+ $(CONSOLE ) :
11
+ @exit
12
+
13
+ serve_as_sf : $(CONSOLE )
14
+ @$(CONSOLE ) | grep server:start > /dev/null || ${MAKE} serve_as_php
15
+ @$(CONSOLE ) server:start || exit 0
16
+
17
+ @printf "Quit the server with \033[32;49mbin/console server:stop.\033[39m\n"
18
+
19
+ serve_as_php :
20
+ @printf " \033[32;49mServer listening on http://127.0.0.1:8000\033[39m\n" ;
21
+ @printf " Quit the server with CTRL-C.\n"
22
+ @printf " Run \033[32mcomposer require symfony/web-server-bundle\033[39m for a better web server\n"
13
23
php -S 127.0.0.1:8000 -t web
14
- .PHONY : serve
24
+
25
+ serve :
26
+ @${MAKE} serve_as_sf
27
+ .PHONY : serve serve_as_sf serve_as_php
You can’t perform that action at this time.
0 commit comments