summaryrefslogtreecommitdiffstats
path: root/lib/backbone/readme.js
diff options
context:
space:
mode:
authorSamy Pessé <samypesse@gmail.com>2016-01-22 21:04:36 +0100
committerSamy Pessé <samypesse@gmail.com>2016-01-22 21:04:36 +0100
commit877f2e477b010f9f37a9044606f110a90f077680 (patch)
tree5cd61cf3b00ba10dc6110535ed9fdf67d8baba72 /lib/backbone/readme.js
parentc8e2fc0e57d223c01a51d6ee186fc1662cd74d13 (diff)
downloadgitbook-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.js26
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;