Skip to content

Commit 710e461

Browse files
mateatslcshakyShane
authored andcommitted
docs: fix codeSync example + add new API methods
1 parent 8d2de9f commit 710e461

File tree

3 files changed

+38
-4
lines changed

3 files changed

+38
-4
lines changed
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
11
// Don't send any file-change events to browsers
2-
codeSync: true,
2+
codeSync: false

docs/api/index.html

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -77,6 +77,7 @@ <h1 class="site-title alt"><a href="/">Browsersync</a> / <span><a href="/docs">d
7777
<li><a href="#api-emitter">.emitter</a></li>
7878
<li><a href="#api-active">.active</a></li>
7979
<li><a href="#api-paused">.paused</a></li>
80+
<li><a href="#api-sockets">.sockets</a></li>
8081
</ul>
8182
</div>
8283

@@ -502,6 +503,18 @@ <h3 id="api-paused" class="section-link">
502503

503504

504505

506+
<h3 id="api-sockets" class="section-link">
507+
<a href="#api-sockets" class="page-anchor">.sockets</a>
508+
<a href="#page-top" class="back-to-top">^ TOP</a>
509+
</h3>
510+
511+
<p><p>Access to client-side socket for emitting events</p>
512+
</p>
513+
514+
515+
516+
517+
505518
</div>
506519
</div>
507520
</article>

docs/options/index.html

Lines changed: 24 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -88,6 +88,7 @@ <h1 class="site-title alt"><a href="/">Browsersync</a> / <span><a href="/docs">d
8888
<li><a href="#option-notify">notify</a></li>
8989
<li><a href="#option-scrollProportionally">scrollProportionally</a></li>
9090
<li><a href="#option-scrollThrottle">scrollThrottle</a></li>
91+
<li><a href="#option-scrollRestoreTechnique">scrollRestoreTechnique</a></li>
9192
<li><a href="#option-reloadDelay">reloadDelay</a></li>
9293
<li><a href="#option-reloadDebounce">reloadDebounce</a></li>
9394
<li><a href="#option-plugins">plugins</a></li>
@@ -565,6 +566,7 @@ <h3 id="option-snippetOptions" class="section-link">
565566
<ul class="param-list">
566567
<li class="type">Type: <span class="color-teal">Object</span>
567568
<ul class="nav nav--stacked subprops">
569+
<li><b>async</b> - Default: <span class="color-teal">undefined</span></li>
568570
<li><b>blacklist</b> - Default: <span class="color-teal">undefined</span></li>
569571
<li><b>whitelist</b> - Default: <span class="color-teal">undefined</span></li>
570572
<li><b>rule.match</b> - Default: <span class="color-teal">/&lt;body[^&gt;]*&gt;/i</span></li>
@@ -575,7 +577,7 @@ <h3 id="option-snippetOptions" class="section-link">
575577

576578
<p class="lede warning"><b>Note: </b> requires at least version 2.0.0</p>
577579

578-
<p>SINCE 1.7.0! You can control how the snippet is injected
580+
<p>You can control how the snippet is injected
579581
onto each page via a custom regex + function.
580582
You can also provide patterns for certain urls
581583
that should be ignored from the snippet injection.</p>
@@ -825,6 +827,23 @@ <h3 id="option-scrollThrottle" class="section-link">
825827
<pre class='highlight'><code class="js">scrollThrottle: <span class="hljs-number">100</span> <span class="hljs-comment">// only send scroll events every 100 milliseconds</span></code></pre>
826828

827829

830+
<h3 id="option-scrollRestoreTechnique" class="section-link">
831+
<a href="#option-scrollRestoreTechnique" class="page-anchor">scrollRestoreTechnique</a>
832+
<a href="#page-top" class="back-to-top">^ TOP</a>
833+
</h3>
834+
835+
836+
<ul class="param-list">
837+
<li class="type">Type: <span class="color-teal">String</span>
838+
</li>
839+
<li class="default">Default: <span class="color-teal">&#x27;window.name&#x27;</span></li>
840+
</ul>
841+
842+
843+
844+
845+
846+
828847
<h3 id="option-reloadDelay" class="section-link">
829848
<a href="#option-reloadDelay" class="page-anchor">reloadDelay</a>
830849
<a href="#page-top" class="back-to-top">^ TOP</a>
@@ -999,7 +1018,8 @@ <h3 id="option-codeSync" class="section-link">
9991018

10001019

10011020
<pre class='highlight'><code class="js"><span class="hljs-comment">// Don't send any file-change events to browsers</span>
1002-
codeSync: <span class="hljs-literal">true</span>,</code></pre>
1021+
codeSync: <span class="hljs-literal">false</span>
1022+
</code></pre>
10031023

10041024

10051025
<h3 id="option-timestamps" class="section-link">
@@ -1066,14 +1086,15 @@ <h3 id="option-socket" class="section-link">
10661086
<li><b>path</b> - Default: <span class="color-teal">&quot;/browser-sync/socket.io&quot;</span></li>
10671087
<li><b>clientPath</b> - Default: <span class="color-teal">&quot;/browser-sync&quot;</span></li>
10681088
<li><b>namespace</b> - Default: <span class="color-teal">&quot;/browser-sync&quot;</span></li>
1089+
<li><b>domain</b> - Default: <span class="color-teal">undefined</span></li>
10691090
<li><b>clients.heartbeatTimeout</b> - Default: <span class="color-teal">5000</span></li>
10701091
</ul>
10711092
</li>
10721093
</ul>
10731094

10741095
<p class="lede warning"><b>Note: </b> requires at least version 1.6.2</p>
10751096

1076-
<p>Configure the Socket.IO path and namespace to avoid collisions. Note: <code>namespace</code> can also be a function</p>
1097+
<p>Configure the Socket.IO path and namespace &amp; domain to avoid collisions.</p>
10771098

10781099

10791100
<pre class='highlight'><code class="js"><span class="hljs-comment">// This will result in something like this in</span>

0 commit comments

Comments
 (0)