| OLD | NEW |
| 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 * Temporary deploy command used to create a version of the app that can be | 6 * Temporary deploy command used to create a version of the app that can be |
| 7 * compiled with dart2js and deployed. This library should go away once `pub | 7 * compiled with dart2js and deployed. Following pub layout conventions, this |
| 8 * deploy` can be configured to run barback transformers. | 8 * script will treat any HTML file under a package 'web/' and 'test/' |
| 9 * directories as entry points. |
| 9 * | 10 * |
| 10 * From an application package you can run this program by calling dart with a | 11 * From an application package you can run deploy by creating a small program |
| 11 * 'package:' url to this file: | 12 * as follows: |
| 12 * | 13 * |
| 13 * dart package:polymer/deploy.dart | 14 * import "package:polymer/deploy.dart" as deploy; |
| 15 * main() => deploy.main(); |
| 16 * |
| 17 * This library should go away once `pub deploy` can be configured to run |
| 18 * barback transformers. |
| 14 */ | 19 */ |
| 15 library polymer.deploy; | 20 library polymer.deploy; |
| 16 | 21 |
| 17 import 'dart:async'; | 22 import 'dart:async'; |
| 18 import 'dart:convert'; | 23 import 'dart:convert'; |
| 19 import 'dart:io'; | 24 import 'dart:io'; |
| 20 | 25 |
| 21 import 'package:barback/barback.dart'; | 26 import 'package:barback/barback.dart'; |
| 22 import 'package:path/path.dart' as path; | 27 import 'package:path/path.dart' as path; |
| 23 import 'package:polymer/src/transform.dart' show phases; | 28 import 'package:polymer/src/transform.dart' show phases; |
| (...skipping 223 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 247 print(e.message); | 252 print(e.message); |
| 248 _showUsage(parser); | 253 _showUsage(parser); |
| 249 return null; | 254 return null; |
| 250 } | 255 } |
| 251 } | 256 } |
| 252 | 257 |
| 253 _showUsage(parser) { | 258 _showUsage(parser) { |
| 254 print('Usage: dart package:polymer/deploy.dart [options]'); | 259 print('Usage: dart package:polymer/deploy.dart [options]'); |
| 255 print(parser.getUsage()); | 260 print(parser.getUsage()); |
| 256 } | 261 } |
| OLD | NEW |