diff --git a/tools/broccoli/angular_builder.ts b/tools/broccoli/angular_builder.ts
index e1c8983dab..ae45e1ef57 100644
--- a/tools/broccoli/angular_builder.ts
+++ b/tools/broccoli/angular_builder.ts
@@ -121,19 +121,13 @@ function writeBuildLog(result: BuildResult, name: string) {
function broccoliNodeToBuildNode(broccoliNode) {
let tree = broccoliNode.tree.newStyleTree || broccoliNode.tree;
- return new BuildNode(
- tree.description || tree.constructor.name,
- tree.inputPath ? [tree.inputPath] : tree.inputPaths,
- tree.cachePath,
- tree.outputPath,
- broccoliNode.subtrees.map(broccoliNodeToBuildNode)
- );
+ return new BuildNode(tree.description || tree.constructor.name,
+ tree.inputPath ? [tree.inputPath] : tree.inputPaths, tree.cachePath,
+ tree.outputPath, broccoliNode.subtrees.map(broccoliNodeToBuildNode));
}
class BuildNode {
-
- constructor(public pluginName:string, public inputPaths: string[], public cachePath: string,
- public outputPath: string, public inputNodes: BroccoliNode[]) {
- }
+ constructor(public pluginName: string, public inputPaths: string[], public cachePath: string,
+ public outputPath: string, public inputNodes: BroccoliNode[]) {}
}
diff --git a/tools/broccoli/trees/dart_tree.ts b/tools/broccoli/trees/dart_tree.ts
index 6bc556678e..f27f5e8da2 100644
--- a/tools/broccoli/trees/dart_tree.ts
+++ b/tools/broccoli/trees/dart_tree.ts
@@ -5,7 +5,6 @@
import {MultiCopy} from './../multi_copy';
import destCopy from '../broccoli-dest-copy';
var Funnel = require('broccoli-funnel');
-var glob = require('glob');
import mergeTrees from '../broccoli-merge-trees';
var path = require('path');
var renderLodashTemplate = require('broccoli-lodash');
@@ -25,7 +24,7 @@ function modulesFunnel(include: string[], exclude?: string[]) {
/**
* Replaces $SCRIPT$ in .html files with actual \n';
@@ -33,7 +32,7 @@ function replaceScriptTagInHtml(content: string, relativePath: string): string {
var scriptName = relativePath.replace(/.*\/([^/]+)\.html$/, '$1.dart');
scriptTags += '\n' +
'';
- return content.replace('$SCRIPTS$', scriptTags);
+ return scriptTags;
}
function stripModulePrefix(relativePath: string): string {
@@ -81,7 +80,11 @@ function fixDartFolderLayout(sourceTree) {
function getHtmlSourcesTree() {
// Replace $SCRIPT$ markers in HTML files.
- var htmlSrcsTree = stew.map(modulesFunnel(['*/src/**/*.html']), replaceScriptTagInHtml);
+ var htmlSrcsTree = modulesFunnel(['*/src/**/*.html']);
+ htmlSrcsTree = replace(
+ htmlSrcsTree,
+ {files: ['*/**'], patterns: [{match: '$SCRIPTS$', replacement: replaceScriptTagInHtml}]});
+
// Copy a url_params_to_form.js for each benchmark html file.
var urlParamsToFormTree = new MultiCopy('', {
srcPath: 'tools/build/snippets/url_params_to_form.js',