18 lines
960 B
Plaintext
18 lines
960 B
Plaintext
- The documentation will be generated by a coffeescript template (gendoc.litcoffee) which collates in the proper order several particular Markdown files, starting with README.md. The list of files includes all of the Literate Coffeescript files, with the actual code stripped out, leaving just the Markdown. The resulting dyna3.md file will be further processed into HTML and placed in the site directory.
|
|
```javascript
|
|
|
|
fs = require 'fs'
|
|
striplit = (text) -> String(text).replace(/^```javascript[^]*?```\n/mg,'')
|
|
incfile = (fn, filt = null) ->
|
|
if (filt is null)
|
|
if (/litcoffee$/.test(fn)) then filt = striplit
|
|
else filt = (x)->x
|
|
process.stdout.write filt fs.readFileSync fn
|
|
process.stdout.write "\n"
|
|
incfile f for f in [
|
|
'README.md', 'src/dyna3.litcoffee',
|
|
'src/helpers/pkglock_to_externals.litcoffee', 'docbuild/extlist.md',
|
|
'doc/tech.md', 'doc/gendoc.litcoffee' ]
|
|
|
|
```
|