-
Notifications
You must be signed in to change notification settings - Fork 101
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Release v0.11.1 #94
Open
kennethormandy
wants to merge
20
commits into
master
Choose a base branch
from
release-v0.11.1
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Release v0.11.1 #94
Changes from all commits
Commits
Show all changes
20 commits
Select commit
Hold shift + click to select a range
88c24c9
support for handlebars templates
trevex d37a4fb
Add handlebars (.hbs) support
b776fea
Test partials with data, too
kennethormandy 964d49e
Bump Handlebars to 3.0.3
mckramer 1deee79
Add partial support for handlebars
mckramer 64915d3
Scopes Jade and Minify, fixes https://github.com/sintaxi/harp/issues/425
kennethormandy 58c366e
Updates LRU Cache
kennethormandy b30538a
Updates EJS to 2.x
kennethormandy c6f3565
Updates Node-sass to v3.x proper
kennethormandy 0f43542
Updates Autoprefixer
kennethormandy 60f2a19
Adds Node v0.12.x to test
kennethormandy 05b4420
Changes scoped modules to namespaced modules for better npm version c…
kennethormandy 1994f19
Updates LRU Cache
kennethormandy d6fc4eb
Updates Node-sass
kennethormandy ca28e18
Updates LESS
kennethormandy dd7aa42
Merge branch 'add-handlebars' of https://github.com/mckramer/terrafor…
kennethormandy b98f43f
Adds failing test for partial syntax change
kennethormandy 7323270
Adds syntax change for Handlebars partial helper
kennethormandy edfc345
Adds passing tests for Handlebars’ use of global data
kennethormandy 4f5d42e
Merge branch 'mckramer-add-handlebars' into release-v0.11.1
kennethormandy File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,4 @@ | ||
language: node_js | ||
node_js: | ||
- "0.10" | ||
- "0.12" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,45 @@ | ||
var Handlebars = require('handlebars') | ||
var TerraformError = require("../../error").TerraformError | ||
|
||
module.exports = function(fileContents, options){ | ||
|
||
/** | ||
* Provides support to load partials. | ||
* | ||
* @usage without locals | ||
* {{partial '../foo.md'}} | ||
* | ||
* @example with provided locals | ||
* {{partial '../foo.jade' locals='{ "a": "b" }'}} | ||
* | ||
* @returns {Handlebars.SafeString} HTML-safe rendered partial | ||
*/ | ||
Handlebars.registerHelper('partial', function(filePath, options) { | ||
var locals = options || {}; | ||
if (typeof locals === 'string') locals = JSON.parse(locals) | ||
return new Handlebars.SafeString(this.partial(filePath, locals)) | ||
}); | ||
|
||
return { | ||
compile: function(){ | ||
return Handlebars.compile(fileContents.toString(), options) | ||
}, | ||
|
||
parseError: function(error){ | ||
|
||
var arr = error.message.split("\n") | ||
var path_arr = arr[0].split(":") | ||
|
||
error.lineno = parseInt(error.lineno || path_arr[path_arr.length -1] || -1) | ||
error.message = arr[arr.length - 1] | ||
error.name = error.name | ||
error.source = "HBS" | ||
error.dest = "HTML" | ||
error.filename = error.path || options.filename | ||
error.stack = fileContents.toString() | ||
|
||
return new TerraformError(error) | ||
} | ||
} | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,8 @@ | ||
{ | ||
"about":{ | ||
"title": "About Page" | ||
}, | ||
"blog": { | ||
"title": "Blog Page" | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
<h1>{{ title }}</h1> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
<!DOCTYPE html> | ||
<html> | ||
<head> | ||
<title>{{ title }}</title> | ||
</head> | ||
<h1>{{ name }}</h1> | ||
</html> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
<h1>Hello! This is {{!-- should be invisible --}}Handlebars!</h1> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
<h1>Hello Handlebars</h1> | ||
{{partial '../profile.jade' '{ "title": "Brock Whitten" }' }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
<h1>Hello Handlebars</h1> | ||
{{partial '../stuff.md' }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
h3 Brock Whitten | ||
h3= title |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Delete
locals=
here for clarity. I did have an alternate branch with option 3 implemented, if you wanted to provide the "locals" helper as well. See commit ef88790.