/browser-sync.sh Secret
Last active
December 1, 2016 14:05
Star
You must be signed in to star a gist
Browsersyncでファイルwatchして再読み込み
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# 127.0.0.1:8000がファイルが変更されたタイミングで再読み込みされる例 | |
# 重たくなるので、監視対象は少ない方が良いっぽい。 | |
#HTMLファイルだけ監視 | |
$ browser-sync start --proxy "127.0.0.1:8000" --files="./**/*.hfml" | |
#CSSファイルだけ監視 | |
$ browser-sync start --proxy "127.0.0.1:8000" --files="./**/*.css" | |
#複数の拡張子(ここではPHP、CSS、JS、HTML)を監視。 | |
$ browser-sync start --proxy "127.0.0.1:8000" --files="./**/*.php,./**/*.css,./**/*.js/,./**/*.html" | |
# 特定のドメインと連携する場合は次のような感じ。ポート省略すると80番 | |
$ browser-sync start --proxy "example.com" --files="./**/*.hfml" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment