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

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

Issue 27903006: Improves how to initialize polymer apps and fixes polymer build and linter to (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 7 years, 2 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
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 261 matching lines...) Expand 10 before | Expand all | Expand 10 after
272 help: 'Remove any build artifacts (if any).') 272 help: 'Remove any build artifacts (if any).')
273 ..addFlag('full', negatable: false, help: 'perform a full build') 273 ..addFlag('full', negatable: false, help: 'perform a full build')
274 ..addFlag('machine', negatable: false, 274 ..addFlag('machine', negatable: false,
275 help: 'Produce warnings in a machine parseable format.') 275 help: 'Produce warnings in a machine parseable format.')
276 ..addFlag('deploy', negatable: false, 276 ..addFlag('deploy', negatable: false,
277 help: 'Whether to force deploying.') 277 help: 'Whether to force deploying.')
278 ..addOption('out', abbr: 'o', help: 'Directory to generate files into.', 278 ..addOption('out', abbr: 'o', help: 'Directory to generate files into.',
279 defaultsTo: 'out') 279 defaultsTo: 'out')
280 ..addFlag('help', abbr: 'h', 280 ..addFlag('help', abbr: 'h',
281 negatable: false, help: 'Displays this help and exit.'); 281 negatable: false, help: 'Displays this help and exit.');
282 var res = parser.parse(args == null ? new Options().arguments : args); 282
283 if (res['help']) { 283 showUsage() {
284 print('A build script that invokes the polymer linter and deploy tools.');
285 print('Usage: dart build.dart [options]'); 284 print('Usage: dart build.dart [options]');
286 print('\nThese are valid options expected by build.dart:'); 285 print('\nThese are valid options expected by build.dart:');
287 print(parser.getUsage()); 286 print(parser.getUsage());
287 }
288
289 var res;
290 try {
291 res = parser.parse(args == null ? new Options().arguments : args);
292 } on FormatException catch (e) {
293 print(e.message);
294 showUsage();
295 exit(1);
296 }
297 if (res['help']) {
298 print('A build script that invokes the polymer linter and deploy tools.');
299 showUsage();
288 exit(0); 300 exit(0);
289 } 301 }
290 return new CommandLineOptions(res['changed'], res['removed'], res['clean'], 302 return new CommandLineOptions(res['changed'], res['removed'], res['clean'],
291 res['full'], res['machine'], res['deploy'], res['out']); 303 res['full'], res['machine'], res['deploy'], res['out']);
292 } 304 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698