diff options
author | Samy Pessé <samypesse@gmail.com> | 2016-01-22 21:04:36 +0100 |
---|---|---|
committer | Samy Pessé <samypesse@gmail.com> | 2016-01-22 21:04:36 +0100 |
commit | 877f2e477b010f9f37a9044606f110a90f077680 (patch) | |
tree | 5cd61cf3b00ba10dc6110535ed9fdf67d8baba72 /lib/backbone/readme.js | |
parent | c8e2fc0e57d223c01a51d6ee186fc1662cd74d13 (diff) | |
download | gitbook-877f2e477b010f9f37a9044606f110a90f077680.zip gitbook-877f2e477b010f9f37a9044606f110a90f077680.tar.gz gitbook-877f2e477b010f9f37a9044606f110a90f077680.tar.bz2 |
Start rewrite
Diffstat (limited to 'lib/backbone/readme.js')
-rw-r--r-- | lib/backbone/readme.js | 26 |
1 files changed, 26 insertions, 0 deletions
diff --git a/lib/backbone/readme.js b/lib/backbone/readme.js new file mode 100644 index 0000000..a4cd9d8 --- /dev/null +++ b/lib/backbone/readme.js @@ -0,0 +1,26 @@ +var util = require('util'); +var BackboneFile = require('./file'); + +function Readme() { + BackboneFile.apply(this, arguments); + + this.title; + this.description; +} +util.inherits(Readme, BackboneFile); + +Readme.prototype.type = 'readme'; + +// Parse the readme content +Readme.prototype.parse = function(content) { + var that = this; + + return this.parser.readme(content) + .then(function(out) { + that.title = out.title; + that.description = out.description; + }); +}; + + +module.exports = Readme; |