mirror of
https://github.com/mgerb/mywebsite
synced 2026-01-12 02:42:48 +00:00
updated bunch of file paths and changed the way posts are loaded
This commit is contained in:
37
node_modules/kareem/docs.js
generated
vendored
Normal file
37
node_modules/kareem/docs.js
generated
vendored
Normal file
@@ -0,0 +1,37 @@
|
||||
var acquit = require('acquit');
|
||||
|
||||
var content = require('fs').readFileSync('./test/examples.test.js').toString();
|
||||
var blocks = acquit.parse(content);
|
||||
|
||||
var mdOutput =
|
||||
'# kareem\n\n' +
|
||||
' [](https://travis-ci.org/vkarpov15/kareem)\n' +
|
||||
' [](https://coveralls.io/r/vkarpov15/kareem)\n\n' +
|
||||
'Re-imagined take on the [hooks](http://npmjs.org/package/hooks) module, ' +
|
||||
'meant to offer additional flexibility in allowing you to execute hooks ' +
|
||||
'whenever necessary, as opposed to simply wrapping a single function.\n\n' +
|
||||
'Named for the NBA\'s all-time leading scorer Kareem Abdul-Jabbar, known ' +
|
||||
'for his mastery of the [hook shot](http://en.wikipedia.org/wiki/Kareem_Abdul-Jabbar#Skyhook)\n\n' +
|
||||
'<img src="http://upload.wikimedia.org/wikipedia/commons/0/00/Kareem-Abdul-Jabbar_Lipofsky.jpg" width="220">\n\n' +
|
||||
'# API\n\n';
|
||||
|
||||
for (var i = 0; i < blocks.length; ++i) {
|
||||
var describe = blocks[i];
|
||||
mdOutput += '## ' + describe.contents + '\n\n';
|
||||
mdOutput += describe.comments[0] ?
|
||||
acquit.trimEachLine(describe.comments[0]) + '\n\n' :
|
||||
'';
|
||||
|
||||
for (var j = 0; j < describe.blocks.length; ++j) {
|
||||
var it = describe.blocks[j];
|
||||
mdOutput += '#### It ' + it.contents + '\n\n';
|
||||
mdOutput += it.comments[0] ?
|
||||
acquit.trimEachLine(it.comments[0]) + '\n\n' :
|
||||
'';
|
||||
mdOutput += '```javascript\n';
|
||||
mdOutput += ' ' + it.code + '\n';
|
||||
mdOutput += '```\n\n';
|
||||
}
|
||||
}
|
||||
|
||||
require('fs').writeFileSync('README.md', mdOutput);
|
||||
Reference in New Issue
Block a user