Skip to content

Commit

Permalink
docs: fix codeSync example + add new API methods
Browse files Browse the repository at this point in the history
  • Loading branch information
mateatslc authored and shakyShane committed Jun 28, 2015
1 parent 8d2de9f commit 710e461
Show file tree
Hide file tree
Showing 3 changed files with 38 additions and 4 deletions.
2 changes: 1 addition & 1 deletion _src/_includes/snippets/options/codeSync.js
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
// Don't send any file-change events to browsers
codeSync: true,
codeSync: false
13 changes: 13 additions & 0 deletions docs/api/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,7 @@ <h1 class="site-title alt"><a href="/">Browsersync</a> / <span><a href="/docs">d
<li><a href="#api-emitter">.emitter</a></li>
<li><a href="#api-active">.active</a></li>
<li><a href="#api-paused">.paused</a></li>
<li><a href="#api-sockets">.sockets</a></li>
</ul>
</div>

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



<h3 id="api-sockets" class="section-link">
<a href="#api-sockets" class="page-anchor">.sockets</a>
<a href="#page-top" class="back-to-top">^ TOP</a>
</h3>

<p><p>Access to client-side socket for emitting events</p>
</p>





</div>
</div>
</article>
Expand Down
27 changes: 24 additions & 3 deletions docs/options/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -88,6 +88,7 @@ <h1 class="site-title alt"><a href="/">Browsersync</a> / <span><a href="/docs">d
<li><a href="#option-notify">notify</a></li>
<li><a href="#option-scrollProportionally">scrollProportionally</a></li>
<li><a href="#option-scrollThrottle">scrollThrottle</a></li>
<li><a href="#option-scrollRestoreTechnique">scrollRestoreTechnique</a></li>
<li><a href="#option-reloadDelay">reloadDelay</a></li>
<li><a href="#option-reloadDebounce">reloadDebounce</a></li>
<li><a href="#option-plugins">plugins</a></li>
Expand Down Expand Up @@ -565,6 +566,7 @@ <h3 id="option-snippetOptions" class="section-link">
<ul class="param-list">
<li class="type">Type: <span class="color-teal">Object</span>
<ul class="nav nav--stacked subprops">
<li><b>async</b> - Default: <span class="color-teal">undefined</span></li>
<li><b>blacklist</b> - Default: <span class="color-teal">undefined</span></li>
<li><b>whitelist</b> - Default: <span class="color-teal">undefined</span></li>
<li><b>rule.match</b> - Default: <span class="color-teal">/&lt;body[^&gt;]*&gt;/i</span></li>
Expand All @@ -575,7 +577,7 @@ <h3 id="option-snippetOptions" class="section-link">

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

<p>SINCE 1.7.0! You can control how the snippet is injected
<p>You can control how the snippet is injected
onto each page via a custom regex + function.
You can also provide patterns for certain urls
that should be ignored from the snippet injection.</p>
Expand Down Expand Up @@ -825,6 +827,23 @@ <h3 id="option-scrollThrottle" class="section-link">
<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>


<h3 id="option-scrollRestoreTechnique" class="section-link">
<a href="#option-scrollRestoreTechnique" class="page-anchor">scrollRestoreTechnique</a>
<a href="#page-top" class="back-to-top">^ TOP</a>
</h3>


<ul class="param-list">
<li class="type">Type: <span class="color-teal">String</span>
</li>
<li class="default">Default: <span class="color-teal">&#x27;window.name&#x27;</span></li>
</ul>






<h3 id="option-reloadDelay" class="section-link">
<a href="#option-reloadDelay" class="page-anchor">reloadDelay</a>
<a href="#page-top" class="back-to-top">^ TOP</a>
Expand Down Expand Up @@ -999,7 +1018,8 @@ <h3 id="option-codeSync" class="section-link">


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


<h3 id="option-timestamps" class="section-link">
Expand Down Expand Up @@ -1066,14 +1086,15 @@ <h3 id="option-socket" class="section-link">
<li><b>path</b> - Default: <span class="color-teal">&quot;/browser-sync/socket.io&quot;</span></li>
<li><b>clientPath</b> - Default: <span class="color-teal">&quot;/browser-sync&quot;</span></li>
<li><b>namespace</b> - Default: <span class="color-teal">&quot;/browser-sync&quot;</span></li>
<li><b>domain</b> - Default: <span class="color-teal">undefined</span></li>
<li><b>clients.heartbeatTimeout</b> - Default: <span class="color-teal">5000</span></li>
</ul>
</li>
</ul>

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

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


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

0 comments on commit 710e461

Please sign in to comment.