Skip to content

Commit

Permalink
Merge remote-tracking branch 'refs/remotes/assemble/master'
Browse files Browse the repository at this point in the history
  • Loading branch information
jonschlinkert committed Apr 6, 2013
2 parents 4ff30f3 + f29a4c7 commit 0c794db
Show file tree
Hide file tree
Showing 5 changed files with 38 additions and 8 deletions.
6 changes: 4 additions & 2 deletions Gruntfile.js
Expand Up @@ -52,10 +52,12 @@ module.exports = function(grunt) {
// Run basic tests on templates and data.
tests: {
options: {
layout: 'test/files/layout-includes.hbs'
//layout: 'test/files/layout-includes.hbs'
layout: 'test/files/layout.hbs'
},
files: {
'test/actual/': ['test/files/extend.hbs']
//'test/actual/': ['test/files/extend.hbs']
'test/actual/': ['test/files/dates.hbs']
}
},
yaml: {
Expand Down
9 changes: 5 additions & 4 deletions lib/utils/engineLoader.js
@@ -1,6 +1,6 @@
/* ==========================================================
* lib/utils/engineLoader.js
*
*
* Assemble
* http://assemble.io
*
Expand All @@ -25,7 +25,8 @@

var defaults = {
engine: 'handlebars',
helpers: '../engines/handlebars/helpers/defaultHelpers.js',
//helpers: '../engines/handlebars/helpers/defaultHelpers.js',
helpers: ['helper-lib'],
preprocessors: false
};
this.options = _.extend(defaults, options);
Expand Down Expand Up @@ -81,7 +82,7 @@
}

for(var i=0; i < this.options.helpers.length; i++) {
this.requireHelper(this.options.helpers[i]).register(engine);
this.requireHelper(this.options.helpers[i]); //.register(engine);
}

}
Expand Down Expand Up @@ -150,7 +151,7 @@
if(helper) { return helper; }
else { helper = false; fullPath = ''; }

return null;
return helper;

};

Expand Down
4 changes: 2 additions & 2 deletions package.json
Expand Up @@ -40,7 +40,7 @@
"dependencies": {
"amdefine": "0.0.4",
"handlebars": "~1.0.10",
"helper-lib": "~0.1.x",
"helper-lib": "git://github.com/assemble/helper-lib.git",
"highlight.js": "*",
"js-yaml": "~2.0.3",
"lodash": "~1.1.1",
Expand Down Expand Up @@ -115,4 +115,4 @@
"yaml data",
"web framework"
]
}
}
18 changes: 18 additions & 0 deletions test/actual/dates.html
@@ -0,0 +1,18 @@
<!doctype html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>YAML Test</title>
<link href="/bootstrap.css" rel="stylesheet">
</head>
<body>
<div class="container">


<div>Date: Sat Apr 06 2013 17:32:52 GMT-0400 (Eastern Daylight Time)</div>

<div>Born 33 years ago</div>

</div>
</body>
</html>
9 changes: 9 additions & 0 deletions test/files/dates.hbs
@@ -0,0 +1,9 @@
---
description: testing the dates helpers
css: <link rel="stylesheet" href="/css/index.css"/>
js: document.write('foo bar!');
---

<div>Date: {{now}}</div>

<div>Born {{timeago '09/07/1979'}}</div>

0 comments on commit 0c794db

Please sign in to comment.