Skip to content

Commit

Permalink
Engine template file extension is now optional, defaults to html. Mig…
Browse files Browse the repository at this point in the history
…rate engine test to buster.
  • Loading branch information
cliffano committed Feb 14, 2013
1 parent a47bf6f commit 439b204
Show file tree
Hide file tree
Showing 4 changed files with 211 additions and 252 deletions.
2 changes: 1 addition & 1 deletion CHANGELOG.md
Original file line number Original file line Diff line number Diff line change
@@ -1,5 +1,5 @@
### 0.0.7-pre ### 0.0.7-pre
* * Engine template file extension is now optional, defaults to html


### 0.0.6 ### 0.0.6
* Fix incorrect URL path and directory path on Windows * Fix incorrect URL path and directory path on Windows
Expand Down
2 changes: 1 addition & 1 deletion lib/ae86.js
Original file line number Original file line Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ AE86.prototype.generate = function (cb) {
return params; return params;
} }


var _engine = new engine('html'), var _engine = new engine(),
tasks = {}; tasks = {};


['partials', 'layouts', 'pages'].forEach(function (dir) { ['partials', 'layouts', 'pages'].forEach(function (dir) {
Expand Down
10 changes: 7 additions & 3 deletions lib/engine.js
Original file line number Original file line Diff line number Diff line change
Expand Up @@ -10,10 +10,14 @@ var _ = require('underscore'),
/** /**
* class Engine * class Engine
* *
* @param {String} ext: template file extension, files without this extension will be ignored. * @param {String} opts: optional
* - ext: template file extension, files without this extension will be ignored.
* - mkdirp: temporary used for testing only, need to figure out how to mock required function using Sinon
*/ */
function Engine(ext) { function Engine(opts) {
this.ext = ext; opts = opts || {};
this.ext = opts.ext || 'html';
mkdirp = opts.mkdirp || mkdirp;
} }


/** /**
Expand Down
Loading

0 comments on commit 439b204

Please sign in to comment.