Skip to content

Instantly share code, notes, and snippets.

@adamtomat
Last active February 25, 2018 14:56
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save adamtomat/deda3b76381ae6e6c9e2 to your computer and use it in GitHub Desktop.
Save adamtomat/deda3b76381ae6e6c9e2 to your computer and use it in GitHub Desktop.
Bash Alias for Browser Sync

Wash your hands of remembering the command to proxy a url through Browser Sync

Usage:

$ sink localhost:4001

Instead of:

$ browser-sync start --proxy "localhost:4001" --files "css/*.css"

Just add this to your bash profile and you're golden.

Note, you don't need to set up an alias; defining the function is enough.

sink() {
    browser-sync start --proxy $1 --files "css/*.css"
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment