Skip to content

Commit

Permalink
Added several TODO comments and a 48:TODO: read metadata from the fir…
Browse files Browse the repository at this point in the history
…st section

75:TODO: refactor this into its own helper method?
106:TODO: read metadata (including author data)
108:TODO: read --nocontrols from argv
115:TODO: output to --output=????? (default, output.html) command
  • Loading branch information
jdan committed Aug 25, 2013
1 parent f7f08b6 commit 9a35bc7
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 0 deletions.
2 changes: 2 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
todo:
@grep -G -o -n "TODO: \(.*\)" lib/cleaver.js
5 changes: 5 additions & 0 deletions lib/cleaver.js
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,7 @@ Cleaver.prototype._parseDocument = function () {
self.document = document;
var slices = self._slice(document);

// TODO: read metadata from the first section
for (var i = 1; i < slices.length; i++) {
self.slides.push(md(slices[i]));
}
Expand All @@ -71,6 +72,7 @@ Cleaver.prototype._loadAssets = function () {
var self = this;
return Q.all(promises)
.then(function (data) {
// TODO: refactor this into its own helper method?
self.template = data[0];
self.jquery = data[1];
self.navigation = data[2];
Expand Down Expand Up @@ -101,13 +103,16 @@ Cleaver.prototype._loadSingleAsset = function (filename) {
Cleaver.prototype._renderSlideshow = function () {
var slideData = {
slides: this.slides,
// TODO: read metadata (including author data)
title: 'Hello, world',
// TODO: read --nocontrols from argv
controls: true,
styles: this.stylesheets,
jquery: this.jquery,
navigation: this.navigation
}

// TODO: output to --output=????? (default, output.html)
console.log(mustache.render(this.template, slideData));
}

Expand Down

0 comments on commit 9a35bc7

Please sign in to comment.