mirror of
https://github.com/jashkenas/coffeescript.git
synced 2026-05-03 03:00:14 -04:00
Update cake doc:source to output to new docs/v{1|2}/annotated-source; collapse doc:underscore into it and generate missing underscore.html (closes #4295)
This commit is contained in:
14
Cakefile
14
Cakefile
@@ -24,6 +24,9 @@ header = """
|
||||
*/
|
||||
"""
|
||||
|
||||
# Used in folder names like docs/v1
|
||||
majorVersion = CoffeeScript.VERSION.split('.')[0]
|
||||
|
||||
# Build the CoffeeScript language from source.
|
||||
build = (cb) ->
|
||||
files = fs.readdirSync 'src'
|
||||
@@ -171,7 +174,6 @@ task 'build:browser', 'rebuild the merged script for inclusion in the browser',
|
||||
|
||||
|
||||
task 'doc:site', 'watch and continually rebuild the documentation for the website', ->
|
||||
majorVersion = CoffeeScript.VERSION.split('.')[0]
|
||||
source = 'documentation/index.html.js'
|
||||
exec 'bin/coffee -bc -o documentation/js documentation/coffee/*.coffee'
|
||||
|
||||
@@ -187,15 +189,11 @@ task 'doc:site', 'watch and continually rebuild the documentation for the websit
|
||||
log 'watching...' , green
|
||||
|
||||
|
||||
task 'doc:source', 'rebuild the internal documentation', ->
|
||||
exec 'node_modules/.bin/docco src/*.*coffee && cp -rf docs documentation && rm -r docs', (err) ->
|
||||
throw err if err
|
||||
task 'doc:source', 'rebuild the annotated source documentation', ->
|
||||
for source in ['src/*.*coffee', 'examples/underscore.coffee']
|
||||
exec "node_modules/docco/bin/docco #{source} --output docs/v#{majorVersion}/annotated-source", (err) -> throw err if err
|
||||
|
||||
|
||||
task 'doc:underscore', 'rebuild the Underscore.coffee documentation page', ->
|
||||
exec 'node_modules/.bin/docco examples/underscore.coffee && cp -rf docs documentation && rm -r docs', (err) ->
|
||||
throw err if err
|
||||
|
||||
task 'bench', 'quick benchmark of compilation time', ->
|
||||
{Rewriter} = require './lib/coffee-script/rewriter'
|
||||
sources = ['coffee-script', 'grammar', 'helpers', 'lexer', 'nodes', 'rewriter']
|
||||
|
||||
1989
docs/v1/annotated-source/underscore.html
Normal file
1989
docs/v1/annotated-source/underscore.html
Normal file
File diff suppressed because it is too large
Load Diff
Reference in New Issue
Block a user