added docs to the repo

This commit is contained in:
Spencer Alger
2013-12-27 16:41:38 -07:00
parent 11c976e9f8
commit 65f9cc7e99
101 changed files with 3907 additions and 63 deletions

View File

@ -49,6 +49,34 @@ var templateGlobals = {
}).join('\n');
},
joinParagraphs: function (block) {
return block.split('\n\n').join('\n+\n');
},
description: function (action) {
try {
return fs.readFileSync(path.join(__dirname, '../../../docs/_descriptions/' + action + '.asciidoc'));
} catch (e) {
if (~e.message.indexOf('ENOENT')) {
return '// no description';
} else {
throw e;
}
}
},
examples: function (action) {
try {
return fs.readFileSync(path.join(__dirname, '../../../docs/_examples/' + action + '.asciidoc'));
} catch (e) {
if (~e.message.indexOf('ENOENT')) {
return '// no examples';
} else {
throw e;
}
}
},
paramType: function (type) {
switch (type && type.toLowerCase ? type.toLowerCase() : 'any') {
case 'time':