mirror of
https://github.com/jashkenas/coffeescript.git
synced 2022-11-09 12:23:24 -05:00
Fix path to browser compiler (#4374)
This commit is contained in:
parent
555e47dbb9
commit
02c5641b32
6 changed files with 31 additions and 27 deletions
7
Cakefile
7
Cakefile
|
@ -170,7 +170,9 @@ task 'build:browser', 'rebuild the merged script for inclusion in the browser',
|
||||||
"""
|
"""
|
||||||
unless process.env.MINIFY is 'false'
|
unless process.env.MINIFY is 'false'
|
||||||
{code} = require('uglify-js').minify code, fromString: true
|
{code} = require('uglify-js').minify code, fromString: true
|
||||||
fs.writeFileSync "docs/v#{majorVersion}/extras/coffee-script.js", header + '\n' + code
|
outputFolder = "docs/v#{majorVersion}/browser-compiler"
|
||||||
|
fs.mkdirSync outputFolder unless fs.existsSync outputFolder
|
||||||
|
fs.writeFileSync "#{outputFolder}/coffee-script.js", header + '\n' + code
|
||||||
console.log "built ... running browser tests:"
|
console.log "built ... running browser tests:"
|
||||||
invoke 'test:browser'
|
invoke 'test:browser'
|
||||||
|
|
||||||
|
@ -188,6 +190,7 @@ task 'doc:site', 'watch and continually rebuild the documentation for the websit
|
||||||
output = render
|
output = render
|
||||||
codeFor: codeFor()
|
codeFor: codeFor()
|
||||||
releaseHeader: releaseHeader
|
releaseHeader: releaseHeader
|
||||||
|
majorVersion: majorVersion
|
||||||
fs.writeFileSync "docs/v#{majorVersion}/index.html", output
|
fs.writeFileSync "docs/v#{majorVersion}/index.html", output
|
||||||
log 'compiled', green, "#{indexFile} → docs/v#{majorVersion}/index.html"
|
log 'compiled', green, "#{indexFile} → docs/v#{majorVersion}/index.html"
|
||||||
|
|
||||||
|
@ -303,7 +306,7 @@ task 'test', 'run the CoffeeScript language test suite', ->
|
||||||
|
|
||||||
|
|
||||||
task 'test:browser', 'run the test suite against the merged browser script', ->
|
task 'test:browser', 'run the test suite against the merged browser script', ->
|
||||||
source = fs.readFileSync "docs/v#{majorVersion}/extras/coffee-script.js", 'utf-8'
|
source = fs.readFileSync "docs/v#{majorVersion}/browser-compiler/coffee-script.js", 'utf-8'
|
||||||
result = {}
|
result = {}
|
||||||
global.testingBrowser = yes
|
global.testingBrowser = yes
|
||||||
(-> eval source).call result
|
(-> eval source).call result
|
||||||
|
|
1
docs/current
Symbolic link
1
docs/current
Symbolic link
|
@ -0,0 +1 @@
|
||||||
|
v1
|
|
@ -254,7 +254,7 @@ cubes = (function() {
|
||||||
using the <a href="http://jison.org">Jison parser generator</a>. The
|
using the <a href="http://jison.org">Jison parser generator</a>. The
|
||||||
command-line version of <code>coffee</code> is available as a
|
command-line version of <code>coffee</code> is available as a
|
||||||
<a href="http://nodejs.org/">Node.js</a> utility. The
|
<a href="http://nodejs.org/">Node.js</a> utility. The
|
||||||
<a href="extras/coffee-script.js">core compiler</a> however, does not
|
<a href="v1/browser-compiler/coffee-script.js">core compiler</a> however, does not
|
||||||
depend on Node, and can be run in any JavaScript environment, or in the
|
depend on Node, and can be run in any JavaScript environment, or in the
|
||||||
browser (see "Try CoffeeScript", above).
|
browser (see "Try CoffeeScript", above).
|
||||||
</p>
|
</p>
|
||||||
|
@ -2375,8 +2375,8 @@ task(<span class="string">'build:parser'</span>, <span class="string">'rebuild t
|
||||||
While it's not recommended for serious use, CoffeeScripts may be included
|
While it's not recommended for serious use, CoffeeScripts may be included
|
||||||
directly within the browser using <code><script type="text/coffeescript"></code>
|
directly within the browser using <code><script type="text/coffeescript"></code>
|
||||||
tags. The source includes a compressed and minified version of the compiler
|
tags. The source includes a compressed and minified version of the compiler
|
||||||
(<a href="extras/coffee-script.js">Download current version here, 39k when gzipped</a>)
|
(<a href="v1/browser-compiler/coffee-script.js">Download current version here, 39k when gzipped</a>)
|
||||||
as <code>extras/coffee-script.js</code>. Include this file on a page with
|
as <code>v1/browser-compiler/coffee-script.js</code>. Include this file on a page with
|
||||||
inline CoffeeScript tags, and it will compile and evaluate them in order.
|
inline CoffeeScript tags, and it will compile and evaluate them in order.
|
||||||
</p>
|
</p>
|
||||||
|
|
||||||
|
@ -3610,7 +3610,7 @@ six = ->
|
||||||
<span class="timestamp"> — <time datetime="2010-02-25">February 25, 2010</time></span>
|
<span class="timestamp"> — <time datetime="2010-02-25">February 25, 2010</time></span>
|
||||||
</b>
|
</b>
|
||||||
Added a compressed version of the compiler for inclusion in web pages as
|
Added a compressed version of the compiler for inclusion in web pages as
|
||||||
<br /><code>extras/coffee-script.js</code>. It'll automatically run any script tags
|
<br /><code>v1/browser-compiler/coffee-script.js</code>. It'll automatically run any script tags
|
||||||
with type <code>text/coffeescript</code> for you. Added a <code>--stdio</code> option
|
with type <code>text/coffeescript</code> for you. Added a <code>--stdio</code> option
|
||||||
to the <code>coffee</code> command, for piped-in compiles.
|
to the <code>coffee</code> command, for piped-in compiles.
|
||||||
</p>
|
</p>
|
||||||
|
@ -3955,7 +3955,7 @@ six = ->
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.12.4/jquery.min.js"></script>
|
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.12.4/jquery.min.js"></script>
|
||||||
<script src="v1/extras/coffee-script.js"></script>
|
<script src="v1/browser-compiler/coffee-script.js"></script>
|
||||||
|
|
||||||
</body>
|
</body>
|
||||||
</html>
|
</html>
|
||||||
|
|
|
@ -77,18 +77,18 @@
|
||||||
Annotated Source
|
Annotated Source
|
||||||
</div>
|
</div>
|
||||||
<div class="contents menu">
|
<div class="contents menu">
|
||||||
<a href="v1/annotated-source/grammar.html">Grammar Rules — src/grammar</a>
|
<a href="v<%= majorVersion %>/annotated-source/grammar.html">Grammar Rules — src/grammar</a>
|
||||||
<a href="v1/annotated-source/lexer.html">Lexing Tokens — src/lexer</a>
|
<a href="v<%= majorVersion %>/annotated-source/lexer.html">Lexing Tokens — src/lexer</a>
|
||||||
<a href="v1/annotated-source/rewriter.html">The Rewriter — src/rewriter</a>
|
<a href="v<%= majorVersion %>/annotated-source/rewriter.html">The Rewriter — src/rewriter</a>
|
||||||
<a href="v1/annotated-source/nodes.html">The Syntax Tree — src/nodes</a>
|
<a href="v<%= majorVersion %>/annotated-source/nodes.html">The Syntax Tree — src/nodes</a>
|
||||||
<a href="v1/annotated-source/scope.html">Lexical Scope — src/scope</a>
|
<a href="v<%= majorVersion %>/annotated-source/scope.html">Lexical Scope — src/scope</a>
|
||||||
<a href="v1/annotated-source/helpers.html">Helpers & Utility Functions — src/helpers</a>
|
<a href="v<%= majorVersion %>/annotated-source/helpers.html">Helpers & Utility Functions — src/helpers</a>
|
||||||
<a href="v1/annotated-source/coffee-script.html">The CoffeeScript Module — src/coffee-script</a>
|
<a href="v<%= majorVersion %>/annotated-source/coffee-script.html">The CoffeeScript Module — src/coffee-script</a>
|
||||||
<a href="v1/annotated-source/cake.html">Cake & Cakefiles — src/cake</a>
|
<a href="v<%= majorVersion %>/annotated-source/cake.html">Cake & Cakefiles — src/cake</a>
|
||||||
<a href="v1/annotated-source/command.html">"coffee" Command-Line Utility — src/command</a>
|
<a href="v<%= majorVersion %>/annotated-source/command.html">"coffee" Command-Line Utility — src/command</a>
|
||||||
<a href="v1/annotated-source/optparse.html">Option Parsing — src/optparse</a>
|
<a href="v<%= majorVersion %>/annotated-source/optparse.html">Option Parsing — src/optparse</a>
|
||||||
<a href="v1/annotated-source/repl.html">Interactive REPL — src/repl</a>
|
<a href="v<%= majorVersion %>/annotated-source/repl.html">Interactive REPL — src/repl</a>
|
||||||
<a href="v1/annotated-source/sourcemap.html">Source Maps — src/sourcemap</a>
|
<a href="v<%= majorVersion %>/annotated-source/sourcemap.html">Source Maps — src/sourcemap</a>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
@ -146,11 +146,11 @@
|
||||||
|
|
||||||
<p>
|
<p>
|
||||||
The CoffeeScript compiler is itself
|
The CoffeeScript compiler is itself
|
||||||
<a href="v1/annotated-source/grammar.html">written in CoffeeScript</a>,
|
<a href="v<%= majorVersion %>/annotated-source/grammar.html">written in CoffeeScript</a>,
|
||||||
using the <a href="http://jison.org">Jison parser generator</a>. The
|
using the <a href="http://jison.org">Jison parser generator</a>. The
|
||||||
command-line version of <code>coffee</code> is available as a
|
command-line version of <code>coffee</code> is available as a
|
||||||
<a href="http://nodejs.org/">Node.js</a> utility. The
|
<a href="http://nodejs.org/">Node.js</a> utility. The
|
||||||
<a href="extras/coffee-script.js">core compiler</a> however, does not
|
<a href="v<%= majorVersion %>/browser-compiler/coffee-script.js">core compiler</a> however, does not
|
||||||
depend on Node, and can be run in any JavaScript environment, or in the
|
depend on Node, and can be run in any JavaScript environment, or in the
|
||||||
browser (see "Try CoffeeScript", above).
|
browser (see "Try CoffeeScript", above).
|
||||||
</p>
|
</p>
|
||||||
|
@ -1077,7 +1077,7 @@ Block
|
||||||
<code>build</code> before <code>test</code>, you can use the <code>invoke</code> function:
|
<code>build</code> before <code>test</code>, you can use the <code>invoke</code> function:
|
||||||
<code>invoke 'build'</code>. Cake tasks are a minimal way to expose your
|
<code>invoke 'build'</code>. Cake tasks are a minimal way to expose your
|
||||||
CoffeeScript functions to the command line, so
|
CoffeeScript functions to the command line, so
|
||||||
<a href="v1/annotated-source/cake.html">don't expect any fanciness built-in</a>.
|
<a href="v<%= majorVersion %>/annotated-source/cake.html">don't expect any fanciness built-in</a>.
|
||||||
If you need dependencies, or async callbacks, it's best to put them in your
|
If you need dependencies, or async callbacks, it's best to put them in your
|
||||||
code itself — not the cake task.
|
code itself — not the cake task.
|
||||||
</p>
|
</p>
|
||||||
|
@ -1111,8 +1111,8 @@ Block
|
||||||
While it's not recommended for serious use, CoffeeScripts may be included
|
While it's not recommended for serious use, CoffeeScripts may be included
|
||||||
directly within the browser using <code><script type="text/coffeescript"></code>
|
directly within the browser using <code><script type="text/coffeescript"></code>
|
||||||
tags. The source includes a compressed and minified version of the compiler
|
tags. The source includes a compressed and minified version of the compiler
|
||||||
(<a href="extras/coffee-script.js">Download current version here, 39k when gzipped</a>)
|
(<a href="v<%= majorVersion %>/browser-compiler/coffee-script.js">Download current version here, 39k when gzipped</a>)
|
||||||
as <code>extras/coffee-script.js</code>. Include this file on a page with
|
as <code>v<%= majorVersion %>/browser-compiler/coffee-script.js</code>. Include this file on a page with
|
||||||
inline CoffeeScript tags, and it will compile and evaluate them in order.
|
inline CoffeeScript tags, and it will compile and evaluate them in order.
|
||||||
</p>
|
</p>
|
||||||
|
|
||||||
|
@ -2169,7 +2169,7 @@ six = ->
|
||||||
<p>
|
<p>
|
||||||
<%= releaseHeader('2010-02-25', '0.5.2', '0.5.1') %>
|
<%= releaseHeader('2010-02-25', '0.5.2', '0.5.1') %>
|
||||||
Added a compressed version of the compiler for inclusion in web pages as
|
Added a compressed version of the compiler for inclusion in web pages as
|
||||||
<br /><code>extras/coffee-script.js</code>. It'll automatically run any script tags
|
<br /><code>v<%= majorVersion %>/browser-compiler/coffee-script.js</code>. It'll automatically run any script tags
|
||||||
with type <code>text/coffeescript</code> for you. Added a <code>--stdio</code> option
|
with type <code>text/coffeescript</code> for you. Added a <code>--stdio</code> option
|
||||||
to the <code>coffee</code> command, for piped-in compiles.
|
to the <code>coffee</code> command, for piped-in compiles.
|
||||||
</p>
|
</p>
|
||||||
|
@ -2442,7 +2442,7 @@ six = ->
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.12.4/jquery.min.js"></script>
|
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.12.4/jquery.min.js"></script>
|
||||||
<script src="v1/extras/coffee-script.js"></script>
|
<script src="v<%= majorVersion %>/browser-compiler/coffee-script.js"></script>
|
||||||
|
|
||||||
</body>
|
</body>
|
||||||
</html>
|
</html>
|
||||||
|
|
|
@ -3,7 +3,7 @@
|
||||||
<head>
|
<head>
|
||||||
<meta http-equiv="Content-Type" content="text/html;charset=utf-8" />
|
<meta http-equiv="Content-Type" content="text/html;charset=utf-8" />
|
||||||
<title>CoffeeScript Test Suite</title>
|
<title>CoffeeScript Test Suite</title>
|
||||||
<script src="../extras/coffee-script.js"></script>
|
<script src="../docs/current/browser-compiler/coffee-script.js"></script>
|
||||||
<style>
|
<style>
|
||||||
body {
|
body {
|
||||||
margin: 30px;
|
margin: 30px;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue