Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(5)

Side by Side Diff: pkg/polymer/lib/src/build/runner.dart

Issue 158083002: introduce web_components pkg for consolidated polyfills (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 6 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « pkg/polymer/lib/src/build/polyfill_injector.dart ('k') | pkg/polymer/lib/src/declaration.dart » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file
2 // for details. All rights reserved. Use of this source code is governed by a 2 // for details. All rights reserved. Use of this source code is governed by a
3 // BSD-style license that can be found in the LICENSE file. 3 // BSD-style license that can be found in the LICENSE file.
4 4
5 /** 5 /**
6 * Definitions used to run the polymer linter and deploy tools without using 6 * Definitions used to run the polymer linter and deploy tools without using
7 * pub serve or pub deploy. 7 * pub serve or pub deploy.
8 */ 8 */
9 library polymer.src.build.runner; 9 library polymer.src.build.runner;
10 10
(...skipping 99 matching lines...) Expand 10 before | Expand all | Expand 10 after
110 var map = JSON.decode(result.stdout)["packages"]; 110 var map = JSON.decode(result.stdout)["packages"];
111 map.forEach((k, v) { map[k] = path.dirname(v); }); 111 map.forEach((k, v) { map[k] = path.dirname(v); });
112 map[currentPackage] = '.'; 112 map[currentPackage] = '.';
113 return map; 113 return map;
114 } 114 }
115 115
116 /** Internal packages used by polymer. */ 116 /** Internal packages used by polymer. */
117 // TODO(sigmund): consider computing this list by recursively parsing 117 // TODO(sigmund): consider computing this list by recursively parsing
118 // pubspec.yaml files in the `Options.packageDirs`. 118 // pubspec.yaml files in the `Options.packageDirs`.
119 final Set<String> _polymerPackageDependencies = [ 119 final Set<String> _polymerPackageDependencies = [
120 'analyzer', 'args', 'barback', 'browser', 'custom_element', 'html5lib', 120 'analyzer', 'args', 'barback', 'browser', 'html5lib',
121 'html_import', 'js', 'logging', 'mutation_observer', 'observe', 'path' 121 'js', 'logging', 'mutation_observer', 'observe', 'path'
122 'polymer_expressions', 'serialization', 'shadow_dom', 'source_maps', 122 'polymer_expressions', 'serialization', 'source_maps',
123 'stack_trace', 'template_binding', 'unittest', 'unmodifiable_collection', 123 'stack_trace', 'template_binding', 'unittest', 'unmodifiable_collection',
124 'yaml'].toSet(); 124 'web_components', 'yaml'].toSet();
125 125
126 /** Return the relative path of each file under [subDir] in [package]. */ 126 /** Return the relative path of each file under [subDir] in [package]. */
127 Iterable<String> _listPackageDir(String package, String subDir, 127 Iterable<String> _listPackageDir(String package, String subDir,
128 BarbackOptions options) { 128 BarbackOptions options) {
129 var packageDir = options.packageDirs[package]; 129 var packageDir = options.packageDirs[package];
130 if (packageDir == null) return const []; 130 if (packageDir == null) return const [];
131 var dir = new Directory(path.join(packageDir, subDir)); 131 var dir = new Directory(path.join(packageDir, subDir));
132 if (!dir.existsSync()) return const []; 132 if (!dir.existsSync()) return const [];
133 return dir.listSync(recursive: true, followLinks: options.followLinks) 133 return dir.listSync(recursive: true, followLinks: options.followLinks)
134 .where((f) => f is File) 134 .where((f) => f is File)
(...skipping 240 matching lines...) Expand 10 before | Expand all | Expand 10 after
375 output.write(entry.span.getLocationMessage(entry.message, 375 output.write(entry.span.getLocationMessage(entry.message,
376 useColors: useColors, 376 useColors: useColors,
377 color: levelColor)); 377 color: levelColor));
378 } 378 }
379 return output.toString(); 379 return output.toString();
380 } 380 }
381 381
382 const String _RED_COLOR = '\u001b[31m'; 382 const String _RED_COLOR = '\u001b[31m';
383 const String _MAGENTA_COLOR = '\u001b[35m'; 383 const String _MAGENTA_COLOR = '\u001b[35m';
384 const String _NO_COLOR = '\u001b[0m'; 384 const String _NO_COLOR = '\u001b[0m';
OLDNEW
« no previous file with comments | « pkg/polymer/lib/src/build/polyfill_injector.dart ('k') | pkg/polymer/lib/src/declaration.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698