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:
Geoffrey Booth
2016-11-15 21:16:13 -08:00
parent 3739954de6
commit eb46975d87
2 changed files with 1995 additions and 8 deletions

View File

@@ -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']

File diff suppressed because it is too large Load Diff