OLD | NEW |
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 66 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
77 * build(entryPoints: ['web/index.html']); | 77 * build(entryPoints: ['web/index.html']); |
78 * } | 78 * } |
79 */ | 79 */ |
80 library polymer.builder; | 80 library polymer.builder; |
81 | 81 |
82 import 'dart:async'; | 82 import 'dart:async'; |
83 import 'dart:io'; | 83 import 'dart:io'; |
84 | 84 |
85 import 'package:args/args.dart'; | 85 import 'package:args/args.dart'; |
86 | 86 |
87 import 'src/barback_runner.dart'; | 87 import 'src/build/linter.dart'; |
88 import 'src/linter.dart'; | 88 import 'src/build/runner.dart'; |
89 import 'src/transform.dart'; | 89 import 'transformer.dart'; |
90 | 90 |
91 | 91 |
92 /** | 92 /** |
93 * Runs the polymer linter on any relevant file in your package, such as any | 93 * Runs the polymer linter on any relevant file in your package, such as any |
94 * .html file under 'lib/', 'asset/', and 'web/'. And, if requested, creates a | 94 * .html file under 'lib/', 'asset/', and 'web/'. And, if requested, creates a |
95 * directory suitable for deploying a Polymer application to a server. | 95 * directory suitable for deploying a Polymer application to a server. |
96 * | 96 * |
97 * The [entryPoints] list contains files under web/ that should be treated as | 97 * The [entryPoints] list contains files under web/ that should be treated as |
98 * entry points. Each entry on this list is a relative path from the package | 98 * entry points. Each entry on this list is a relative path from the package |
99 * root (for example 'web/index.html'). If null, all files under 'web/' are | 99 * root (for example 'web/index.html'). If null, all files under 'web/' are |
(...skipping 183 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
283 if (res['help']) { | 283 if (res['help']) { |
284 print('A build script that invokes the polymer linter and deploy tools.'); | 284 print('A build script that invokes the polymer linter and deploy tools.'); |
285 print('Usage: dart build.dart [options]'); | 285 print('Usage: dart build.dart [options]'); |
286 print('\nThese are valid options expected by build.dart:'); | 286 print('\nThese are valid options expected by build.dart:'); |
287 print(parser.getUsage()); | 287 print(parser.getUsage()); |
288 exit(0); | 288 exit(0); |
289 } | 289 } |
290 return new CommandLineOptions(res['changed'], res['removed'], res['clean'], | 290 return new CommandLineOptions(res['changed'], res['removed'], res['clean'], |
291 res['full'], res['machine'], res['deploy'], res['out']); | 291 res['full'], res['machine'], res['deploy'], res['out']); |
292 } | 292 } |
OLD | NEW |