Skip to content

Commit

Permalink
2.0.0-beta2 docs
Browse files Browse the repository at this point in the history
  • Loading branch information
GeoffreyBooth committed May 17, 2017
1 parent f0e9837 commit cd6daf0
Show file tree
Hide file tree
Showing 15 changed files with 1,593 additions and 9,208 deletions.
37 changes: 26 additions & 11 deletions docs/v2/annotated-source/browser.html
Expand Up @@ -124,7 +124,6 @@ <h1>browser.coffee</h1>

<div class="content"><div class='highlight'><pre>
CoffeeScript = <span class="hljs-built_in">require</span> <span class="hljs-string">'./coffeescript'</span>
CoffeeScript.<span class="hljs-built_in">require</span> = <span class="hljs-built_in">require</span>
compile = CoffeeScript.compile</pre></div></div>

</li>
Expand Down Expand Up @@ -171,11 +170,12 @@ <h1>browser.coffee</h1>
<div class="pilwrap ">
<a class="pilcrow" href="#section-4">&#182;</a>
</div>
<p>If we’re not in a browser environment, we’re finished with the public API.</p>
<p>Export this more limited <code>CoffeeScript</code> than what is exported by
<code>index.coffee</code>, which is intended for a Node environment.</p>

</div>

<div class="content"><div class='highlight'><pre><span class="hljs-keyword">return</span> <span class="hljs-keyword">unless</span> <span class="hljs-built_in">window</span>?</pre></div></div>
<div class="content"><div class='highlight'><pre><span class="hljs-built_in">module</span>.exports = CoffeeScript</pre></div></div>

</li>

Expand All @@ -186,6 +186,21 @@ <h1>browser.coffee</h1>
<div class="pilwrap ">
<a class="pilcrow" href="#section-5">&#182;</a>
</div>
<p>If we’re not in a browser environment, we’re finished with the public API.</p>

</div>

<div class="content"><div class='highlight'><pre><span class="hljs-keyword">return</span> <span class="hljs-keyword">unless</span> <span class="hljs-built_in">window</span>?</pre></div></div>

</li>


<li id="section-6">
<div class="annotation">

<div class="pilwrap ">
<a class="pilcrow" href="#section-6">&#182;</a>
</div>
<p>Include source maps where possible. If we’ve got a base64 encoder, a
JSON serializer, and tools for escaping unicode characters, we’re good to go.
Ported from <a href="https://developer.mozilla.org/en-US/docs/DOM/window.btoa">https://developer.mozilla.org/en-US/docs/DOM/window.btoa</a></p>
Expand All @@ -200,11 +215,11 @@ <h1>browser.coffee</h1>
</li>


<li id="section-6">
<li id="section-7">
<div class="annotation">

<div class="pilwrap ">
<a class="pilcrow" href="#section-6">&#182;</a>
<a class="pilcrow" href="#section-7">&#182;</a>
</div>
<p>Load a remote script from the current domain via XHR.</p>

Expand All @@ -231,11 +246,11 @@ <h1>browser.coffee</h1>
</li>


<li id="section-7">
<li id="section-8">
<div class="annotation">

<div class="pilwrap ">
<a class="pilcrow" href="#section-7">&#182;</a>
<a class="pilcrow" href="#section-8">&#182;</a>
</div>
<p>Activate CoffeeScript in the browser by having it compile and evaluate
all script tags with a content-type of <code>text/coffeescript</code>.
Expand Down Expand Up @@ -273,11 +288,11 @@ <h1>browser.coffee</h1>
</li>


<li id="section-8">
<li id="section-9">
<div class="annotation">

<div class="pilwrap ">
<a class="pilcrow" href="#section-8">&#182;</a>
<a class="pilcrow" href="#section-9">&#182;</a>
</div>
<p><code>options.filename</code> defines the filename the source map appears as
in Developer Tools. If a script tag has an <code>id</code>, use that as the
Expand All @@ -296,11 +311,11 @@ <h1>browser.coffee</h1>
</li>


<li id="section-9">
<li id="section-10">
<div class="annotation">

<div class="pilwrap ">
<a class="pilcrow" href="#section-9">&#182;</a>
<a class="pilcrow" href="#section-10">&#182;</a>
</div>
<p>Listen for window load, both in decent browsers and in IE.</p>

Expand Down
2 changes: 1 addition & 1 deletion docs/v2/annotated-source/cake.html
Expand Up @@ -141,7 +141,7 @@ <h1>cake.coffee</h1>
path = <span class="hljs-built_in">require</span> <span class="hljs-string">'path'</span>
helpers = <span class="hljs-built_in">require</span> <span class="hljs-string">'./helpers'</span>
optparse = <span class="hljs-built_in">require</span> <span class="hljs-string">'./optparse'</span>
CoffeeScript = <span class="hljs-built_in">require</span> <span class="hljs-string">'./coffeescript'</span></pre></div></div>
CoffeeScript = <span class="hljs-built_in">require</span> <span class="hljs-string">'./'</span></pre></div></div>

</li>

Expand Down

0 comments on commit cd6daf0

Please sign in to comment.