From c204835969903c765d4666f7161808beff29fc33 Mon Sep 17 00:00:00 2001 From: Igor Minar Date: Tue, 19 May 2015 17:39:57 -0700 Subject: [PATCH] style(nodeTree): fix formatting the formatting was messed up due to https://github.com/angular/clang-format/issues/7. I replaced the fat arrow function with regular function expression to resolve the formatting issue --- tools/broccoli/trees/node_tree.ts | 51 +++++++++++++++---------------- 1 file changed, 25 insertions(+), 26 deletions(-) diff --git a/tools/broccoli/trees/node_tree.ts b/tools/broccoli/trees/node_tree.ts index 31fcd811b4..add2329e54 100644 --- a/tools/broccoli/trees/node_tree.ts +++ b/tools/broccoli/trees/node_tree.ts @@ -98,7 +98,7 @@ module.exports = function makeNodeTree(destinationPath) { // HACK: workaround for Traceur behavior. // It expects all transpiled modules to contain this marker. - // TODO: remove this when we no longer use traceur + // TODO: remove this when we no longer use traceur var traceurCompatibleTsModulesTree = replace(modulesTree, { files: ['**/*.ts'], patterns: [{ @@ -106,36 +106,35 @@ module.exports = function makeNodeTree(destinationPath) { match: /$/g, replacement: "" }], - replaceWithPath: (path, content) => { + replaceWithPath: function(path, content) { if (!path.endsWith('.d.ts')) { - content += '\r\nexport var __esModule = true;\n'; + content += '\r\nexport var __esModule = true;\n'; } return content; -} -}); + } + }); -var typescriptTree = compileWithTypescript(traceurCompatibleTsModulesTree, { - allowNonTsExtensions: false, - emitDecoratorMetadata: true, - declaration: true, - mapRoot: '', /* force sourcemaps to use relative path */ - module: 'commonjs', - noEmitOnError: true, - rootDir: '.', - rootFilePaths: ['angular2/traceur-runtime.d.ts', 'angular2/globals.d.ts'], - sourceMap: true, - sourceRoot: '.', - target: 'ES5' -}); + var typescriptTree = compileWithTypescript(traceurCompatibleTsModulesTree, { + allowNonTsExtensions: false, + emitDecoratorMetadata: true, + declaration: true, + mapRoot: '', /* force sourcemaps to use relative path */ + module: 'commonjs', + noEmitOnError: true, + rootDir: '.', + rootFilePaths: ['angular2/traceur-runtime.d.ts', 'angular2/globals.d.ts'], + sourceMap: true, + sourceRoot: '.', + target: 'ES5' + }); -nodeTree = mergeTrees([nodeTree, typescriptTree, docs, packageJsons]); + nodeTree = mergeTrees([nodeTree, typescriptTree, docs, packageJsons]); -// TODO(iminar): tree differ seems to have issues with trees created by mergeTrees, investigate! -// ENOENT error is thrown while doing fs.readdirSync on inputRoot -// in the meantime, we just do noop mv to create a new tree -nodeTree = stew.mv(nodeTree, ''); + // TODO(iminar): tree differ seems to have issues with trees created by mergeTrees, investigate! + // ENOENT error is thrown while doing fs.readdirSync on inputRoot + // in the meantime, we just do noop mv to create a new tree + nodeTree = stew.mv(nodeTree, ''); -return destCopy(nodeTree, destinationPath); -} -; + return destCopy(nodeTree, destinationPath); +};