Permalink
Browse files

Update tests

  • Loading branch information...
1 parent fd2ba90 commit df948482054140c126995f487a7c9ea4e11d1e19 @pvorb committed Feb 15, 2012
View
17 example/bake.js
@@ -1,17 +0,0 @@
-var fs = require('fs');
-var path = require('path');
-var marked = require('marked');
-var bake = require('../bake.js');
-
-var a = {};
-
-// Read the configuration file
-var conf = fs.readFileSync(path.resolve(process.cwd(), 'conf/bake.json'),
- 'utf8');
-
-// Bake some markdown files
-bake(conf, {
- __content: function(filename, properties) {
- return marked(properties.__content);
- }
-}, function () {});
View
20 example/pub/test.html
@@ -1,20 +0,0 @@
-<!DOCTYPE html>
-<html lang="en">
- <head>
- <meta charset="utf-8">
- <title>First post » My Site</title>
- </head>
- <body>
- <h1>First post</h1>
- <p>Written on August 14th, 2011 by Paul</p>
-
-
-<p>This is my <strong>first</strong> blog post.
-
-</p>
-<h2>Here&apos;s a heading</h2>
-<blockquote><p>And this is a block quote</p></blockquote>
-
- </body>
-</html>
-
View
23 test/bake.js
@@ -0,0 +1,23 @@
+var fs = require('fs');
+var path = require('path');
+var pandoc = require('pdc');
+var bake = require('../bake.js');
+
+var a = {};
+
+// Read the configuration file
+var conf = fs.readFileSync(path.resolve(process.cwd(), 'conf/bake.json'),
+ 'utf8');
+
+var hooks = {
+ __content: function(fn, properties, callback) {
+ return pandoc(properties.__content, 'markdown', 'html', callback);
+ }
+};
+
+// Bake some markdown files
+bake(conf, hooks, function (err) {
+ if (err)
+ throw err;
+ console.log('ok');
+});
View
0 example/conf/bake.json → test/conf/bake.json
File renamed without changes.
View
0 test/pub/test.html
No changes.
View
0 example/pub/test.mkd → test/pub/test.mkd
File renamed without changes.
View
0 example/templates/default.tpl → test/templates/default.tpl
File renamed without changes.
View
0 example/templates/post.tpl → test/templates/post.tpl
File renamed without changes.

0 comments on commit df94848

Please sign in to comment.