Single Injection Example - ramybenaroya/ember-index GitHub Wiki
#####Single Content Injection example The following code:
// Brocfile.js
var EmberAddon = require('ember-cli/lib/broccoli/ember-app');
var app = new EmberApp({
'ember-index': {
output: 'index.jsp'
content: {
file: 'example.txt',
includeInOutput: true
includeInIndexHtml: false
}
}
});
module.exports = app.toTree();
// app/example.txt
<!-- some content from exapmle.txt -->
<!-- app/index.html -->
{{content-for 'ember-index'}}
<!DOCTYPE html>
<html>
<head>
....
</head>
<body>
...
</body>
</html>
Will result
<!-- dist/index.html -->
<!DOCTYPE html>
<html>
<head>
...
</head>
<body>
...
</body>
</html>
<!-- dist/index.jsp -->
<!-- some content from exapmle.txt -->
<!DOCTYPE html>
<html>
<head>
...
</head>
<body>
...
</body>
</html>