jeudi 21 décembre 2017

Browsersync send arguments for browser when launching from cmd

I'm currently using Browsersync inside visual studio 2015 enterprise as an external tool and with a click of a button added to the toolbar, it launches a cmd window.

This code for argument works:

/C browser-sync start --files "Content/*.css, Views/*.cshtml" --proxy localhost:7981 --logLevel debug -b "chrome" "firefox"

I'm having trouble in 2 things:

  1. how do I send the port dynamically instead of localhost:7981 so that it works in multiple projects?

  2. adding special arguments for chrome as the following works in cmd directly

    start chrome "http://localhost:3000/" --new-Window --window-size=683,670 --window-position=682,64 --auto-open-devtools-for-tabs

but when I add it to the tool arguments it throws windows error cannot find program

/C browser-sync start --files "Content/*.css, Views/*.cshtml" --proxy localhost:7981 --logLevel debug -b "chrome --new-Window --window-size=683,670 --window-position=682,64  --auto-open-devtools-for-tabs" "firefox"

Aucun commentaire:

Enregistrer un commentaire