File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -53,8 +53,19 @@ var connectUtils = {
5353 var template = fs . readFileSync ( config . templates . connector , "utf-8" ) ;
5454 var url = connectUtils . getConnectionUrl ( options ) ;
5555
56+ /**
57+ * ***Backwards compatibility***. While `socket.path` is technically a
58+ * socketIoClientConfig property, it's been documented previously
59+ * as a top-level option, so must stay.
60+ */
61+ var clientConfig = socket
62+ . get ( "socketIoClientConfig" )
63+ . merge ( {
64+ path : socket . get ( "path" )
65+ } ) ;
66+
5667 template = template
57- . replace ( "%path %" , socket . get ( "path" ) )
68+ . replace ( "%config %" , JSON . stringify ( clientConfig . toJS ( ) ) )
5869 . replace ( "%url%" , url ) ;
5970
6071 return template ;
Original file line number Diff line number Diff line change @@ -415,9 +415,12 @@ module.exports = {
415415 */
416416 socket : {
417417 socketIoOptions : {
418- log : false ,
418+ log : false
419419 } ,
420- path : "/browser-sync/socket.io" ,
420+ socketIoClientConfig : {
421+ reconnectionAttempts : 50
422+ } ,
423+ path : "/browser-sync/shane" ,
421424 clientPath : "/browser-sync" ,
422425 namespace : "/browser-sync" ,
423426 clients : {
Original file line number Diff line number Diff line change @@ -2,5 +2,5 @@ window.___browserSync___ = {};
22___browserSync___.io = window.io ;
33window.io = window.___browserSync___oldSocketIo ;
44window.___browserSync___oldSocketIo = undefined;
5- ___browserSync___.socketConfig = {}; ___browserSync___ .socketConfig.path = '%path%' ;
6- ___browserSync___.socket = ___browserSync___.io (%url%, ___browserSync___.socketConfig );
5+ ___browserSync___.socketConfig = %config% ;
6+ ___browserSync___.socket = ___browserSync___.io (%url%, ___browserSync___.socketConfig );
You can’t perform that action at this time.
0 commit comments