snippetbashTip
browser-sync — A local web server that updates browser on file changes. More information: <https://browsersync.io/d
Viewed 0 times
serverthatcommandlocalupdatesclibrowser-syncweb
Problem
How to use the
browser-sync command: A local web server that updates browser on file changes. More information: <https://browsersync.io/docs/command-line>.Solution
browser-sync — A local web server that updates browser on file changes. More information: <https://browsersync.io/docs/command-line>.Start a server from a specific directory:
browser-sync start --server {{path/to/directory}} --files {{path/to/directory}}Start a server from local directory, watching all CSS files in a directory:
browser-sync start --server --files '{{path/to/directory/*.css}}'Create configuration file:
browser-sync initStart Browsersync from configuration file:
browser-sync start --config {{config_file}}Code Snippets
Start a server from a specific directory
browser-sync start --server {{path/to/directory}} --files {{path/to/directory}}Start a server from local directory, watching all CSS files in a directory
browser-sync start --server --files '{{path/to/directory/*.css}}'Create configuration file
browser-sync initStart Browsersync from configuration file
browser-sync start --config {{config_file}}Context
tldr-pages: common/browser-sync
Revisions (0)
No revisions yet.