forked from mde/ejs
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'master' into feature/multi-views
* master: Fix more mistakes Fix Mistakes Add warning for ejs.render(dataAndOptions) Document JSDoc scripts in the README Clarify jsdocs for filename option Make suggested changes Fix typos Expand Client-side Support Section Clarify docs on the `client` option Add JSDocs for IncludeCallback Export the internal func for escaping XML Improve Documentation for <%_ and _%> Fixes mde#143 Also did some cleanup in the examples. Add documentation for renderFile() and filename fixed mocha test issue fixed unittest Update ejs.js Update index.html moved sample folder Fixed issue mde#119
- Loading branch information
Showing
10 changed files
with
200 additions
and
37 deletions.
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
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
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 @@ | ||
<!-- Execute an exception --> | ||
<p><%= this_variable_is_not_defined %></p> |
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,3 @@ | ||
<head> | ||
<title><%= header %></title> | ||
</head> |
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,20 @@ | ||
<html> | ||
<head> | ||
<% include header.html %> | ||
</head> | ||
<body> | ||
<!-- | ||
Without fix output is confusing | ||
ReferenceError: ./ejs/test/sample/index.html:2 | ||
1| <html> | ||
>> 2| <head> | ||
3| <% include header.html %> | ||
4| </head> | ||
5| <body> | ||
this_variable_is_not_defined is not defined | ||
--> | ||
<% include body.html %> | ||
</body> | ||
</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,11 @@ | ||
var express = require('express'), | ||
ejs = require('../lib/ejs.js'); | ||
var app = express(); | ||
app.engine('.html', ejs.__express); | ||
app.set('view engine', 'ejs'); | ||
app.get('/', function(req, res) { | ||
res.render(__dirname + '/index.html', {header: 'Hello EJS'}); | ||
}); | ||
var server = app.listen(3000, function () { | ||
console.log('Example app listening at http://localhost:3000'); | ||
}); |