Skip to content

Commit

Permalink
fix(release): make resource-inlining regex non-greedy (#653)
Browse files Browse the repository at this point in the history
Change the template regex to support minified js files. This partially addresses inlining resources for an angular-cli prod build.
(cherry picked from commit ba47c8d)
  • Loading branch information
randyaa authored and jelbourn committed Jun 8, 2016
1 parent 4bee178 commit e808452
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion scripts/release/inline-resources.js
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ for (let arg of process.argv.slice(2)) {
* @return {string} The content with all templates inlined.
*/
function inlineTemplate(filePath, content) {
return content.replace(/templateUrl:\s*'([^']+\.html)'/g, function(m, templateUrl) {
return content.replace(/templateUrl:\s*'([^']+?\.html)'/g, function(m, templateUrl) {
const templateFile = path.join(path.dirname(filePath), templateUrl);
const templateContent = fs.readFileSync(templateFile, 'utf-8');
const shortenedTemplate = templateContent
Expand Down

0 comments on commit e808452

Please sign in to comment.