Skip to content

Commit

Permalink
feat(ember): ember app title will be used in the final template
Browse files Browse the repository at this point in the history
the auto-generated templates for ember apps will use the information inside the title tag of the
index.html file of each application
  • Loading branch information
gerard2perez committed Mar 25, 2017
1 parent dc1b205 commit a3513e9
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/functions/emberBuilder.js
Original file line number Diff line number Diff line change
Expand Up @@ -68,8 +68,9 @@ const postbuildember = async function postBuildEmber (application, options) {
return text.match(expresion).join('\n')
.replace(/="[^=]*?assets/igm, `="/${options.directory}/assets`);
};
const title = (/<title>(.*)<\/title>/gm).exec(text)[1];
text = compile(indextemplate, {
title: options.title || application,
title: title,
layout: options.layout || 'main',
path: options.directory,
mount: options.mount,
Expand Down

0 comments on commit a3513e9

Please sign in to comment.