2017-01-26 09:03:53 -05:00
|
|
|
/**
|
|
|
|
* The point of this reader is to tag all the files that are going to be used as examples in the
|
|
|
|
* documentation.
|
|
|
|
* Later on we can extract the regions, via "shredding"; and we can also construct runnable examples
|
2017-11-03 13:08:28 -04:00
|
|
|
* for passing to Stackblitz and the like.
|
2017-01-26 09:03:53 -05:00
|
|
|
*/
|
2017-04-01 14:34:10 -04:00
|
|
|
module.exports = function exampleFileReader() {
|
2017-01-26 09:03:53 -05:00
|
|
|
return {
|
|
|
|
name: 'exampleFileReader',
|
|
|
|
getDocs: function(fileInfo) {
|
|
|
|
return [{docType: 'example-file', content: fileInfo.content, startingLine: 1}];
|
|
|
|
}
|
|
|
|
};
|
|
|
|
};
|