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

Side by Side Diff: pkg/polymer/lib/builder.dart

Issue 157583007: Removing polymer-specific code from barback runner (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 | « no previous file | pkg/polymer/lib/deploy.dart » ('j') | pkg/polymer/lib/deploy.dart » ('J')
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2012, 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 * Common logic to make it easy to run the polymer linter and deploy tool. 6 * Common logic to make it easy to run the polymer linter and deploy tool.
7 * 7 *
8 * The functions in this library are designed to make it easier to create 8 * The functions in this library are designed to make it easier to create
9 * `build.dart` files. A `build.dart` file is a Dart script that can be invoked 9 * `build.dart` files. A `build.dart` file is a Dart script that can be invoked
10 * from the command line, but that can also invoked automatically by the Dart 10 * from the command line, but that can also invoked automatically by the Dart
(...skipping 173 matching lines...) Expand 10 before | Expand all | Expand 10 after
184 options = parseOptions([]); 184 options = parseOptions([]);
185 } 185 }
186 if (currentPackage == null) currentPackage = readCurrentPackageFromPubspec(); 186 if (currentPackage == null) currentPackage = readCurrentPackageFromPubspec();
187 187
188 var transformOptions = new TransformOptions( 188 var transformOptions = new TransformOptions(
189 entryPoints: entryPoints, 189 entryPoints: entryPoints,
190 directlyIncludeJS: options.directlyIncludeJS, 190 directlyIncludeJS: options.directlyIncludeJS,
191 contentSecurityPolicy: options.contentSecurityPolicy, 191 contentSecurityPolicy: options.contentSecurityPolicy,
192 releaseMode: options.releaseMode); 192 releaseMode: options.releaseMode);
193 193
194 var phases = new PolymerTransformerGroup(transformOptions).phases;
194 var barbackOptions = new BarbackOptions( 195 var barbackOptions = new BarbackOptions(
195 new PolymerTransformerGroup(transformOptions).phases, 196 phases, options.outDir, currentPackage: currentPackage,
196 options.outDir, currentPackage: currentPackage, 197 packageDirs: packageDirs, machineFormat: options.machineFormat,
197 packageDirs: packageDirs, machineFormat: options.machineFormat); 198 packagePhases: {'polymer' : phases});
Siggi Cherem (dart-lang) 2014/02/11 23:15:20 actually, for polymer we only need to apply the ob
blois 2014/02/12 02:39:27 Updated builder & deploy to cover this.
Siggi Cherem (dart-lang) 2014/02/12 03:05:28 awesome, thanks!
198 return runBarback(barbackOptions) 199 return runBarback(barbackOptions)
199 .then((_) => print('Done! All files written to "${options.outDir}"')); 200 .then((_) => print('Done! All files written to "${options.outDir}"'));
200 } 201 }
201 202
202 203
203 /** 204 /**
204 * Options that may be used either in build.dart or by the linter and deploy 205 * Options that may be used either in build.dart or by the linter and deploy
205 * tools. 206 * tools.
206 */ 207 */
207 class CommandLineOptions { 208 class CommandLineOptions {
(...skipping 116 matching lines...) Expand 10 before | Expand all | Expand 10 after
324 } 325 }
325 if (res['help']) { 326 if (res['help']) {
326 print('A build script that invokes the polymer linter and deploy tools.'); 327 print('A build script that invokes the polymer linter and deploy tools.');
327 showUsage(); 328 showUsage();
328 exit(0); 329 exit(0);
329 } 330 }
330 return new CommandLineOptions(res['changed'], res['removed'], res['clean'], 331 return new CommandLineOptions(res['changed'], res['removed'], res['clean'],
331 res['full'], res['machine'], res['deploy'], res['out'], res['js'], 332 res['full'], res['machine'], res['deploy'], res['out'], res['js'],
332 res['csp'], !res['debug']); 333 res['csp'], !res['debug']);
333 } 334 }
OLDNEW
« no previous file with comments | « no previous file | pkg/polymer/lib/deploy.dart » ('j') | pkg/polymer/lib/deploy.dart » ('J')

Powered by Google App Engine
This is Rietveld 408576698