Middlemanã®livereloadãã©ã°ã¤ã³ã®è¶ 絶ãããã©ããã§ããWebsocketæ¥ç¶å ãå¤æ´ããæ¹æ³
Middlemanã使ãå§ãã¾ãããlivereloadãã©ã°ã¤ã³ãä½ãèããã«ã»ãã»ãã¨ä½¿ãã¦ãã¾ãã®ã¨ã¦ã便å©ã§ãã! å ·ä½çã«ã¯config.rbã£ã¦ã¨ããã§ä»¥ä¸ã®æ§ã«ããã¨livereloadãã©ã°ã¤ã³ãå°å ¥ã§ãã¾ãã
activate :livereload
ãã®æ©è½ã«ã¤ãã¦ç°¡åã«èª¬æããã¨ãHTMLã®ã½ã¼ã¹ã³ã¼ããããã£ãã¨ãã«ãwebsocketçµç±ã§ãã©ã¦ã¶ãèªåã§ãªãã¼ããããã¿ãããªæãã§ããªãã¼ããã¿ã³ãæ¼ãå¿ è¦ããªããªã£ã¦ã¨ã¦ã便å©ãªæ©è½ã¿ãããªæãã§ããã ãã§ãç¥ã£ã¦ãããæããã¾ããã
ã§ãã¨ããã§ã©ãããã®æ©è½ã¯ããã©ã«ãã ã¨ãã¼ã«ã«ãã¹ãã§éçºãããã¨ãåæã¨ãã¦ããã¿ããã§ããã¨ãã°ä¿ºã¿ããã«å人ã®è¶£å³ãµã¼ãã¼ä¸ã§ middleman ãèµ·åããªãã vim ã§ãã¡ã¤ã«ç·¨éãããã«ãã¼ã«ã«ã®ãã©ã¦ã¶ã§ã¢ã¯ã»ã¹ãã¦éçºãã¦ã人ã ã¨åããªããã§ãã
ã§ãã³ã¬ããªãã¨ãããæ¹æ³ãè¦ã¤ããã¨ããã®ããã®ã¨ã³ããªã¼ã®è¶£æ¨ã§ãããã¾ã(åç½®ããé·ã)
activate :livereload, :host => 'ããªãã®ãµã¼ãã¼ã®IPã¨ããã¹ãå'
ã§ããã¾ãããgithubã«æ¸ãã¦ãã£ãã
https://github.com/middleman/middleman-livereload