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

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

Issue 23431010: Change in deploy.dart to make it easier to run in run.sh without running pub. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 7 years, 3 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/observe/lib/observe_html.dart ('k') | pkg/polymer/lib/polymer.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 * 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. This library should go away once `pub
8 * deploy` can be configured to run barback transformers. 8 * deploy` can be configured to run barback transformers.
9 * 9 *
10 * From an application package you can run this program by calling dart with a 10 * From an application package you can run this program by calling dart with a
(...skipping 22 matching lines...) Expand all
33 _run(args['webdir'], outDir).then( 33 _run(args['webdir'], outDir).then(
34 (_) => print('Done! All files written to "$outDir"')); 34 (_) => print('Done! All files written to "$outDir"'));
35 } 35 }
36 36
37 /** 37 /**
38 * API exposed for testing purposes. Runs this deploy command but prentend that 38 * API exposed for testing purposes. Runs this deploy command but prentend that
39 * the sources under [webDir] belong to package 'test'. 39 * the sources under [webDir] belong to package 'test'.
40 */ 40 */
41 Future runForTest(String webDir, String outDir) { 41 Future runForTest(String webDir, String outDir) {
42 _currentPackage = 'test'; 42 _currentPackage = 'test';
43
44 // associate package dirs with their location in the repo:
45 _packageDirs = {'test' : '.'};
46 addPackages(String dir) {
47 for (var packageDir in new Directory(dir).listSync().map((d) => d.path)) {
48 _packageDirs[path.basename(packageDir)] = packageDir;
49 }
50 }
51 addPackages('..');
52 addPackages('../third_party');
53 addPackages('../../third_party/pkg');
43 return _run(webDir, outDir); 54 return _run(webDir, outDir);
44 } 55 }
45 56
46 Future _run(String webDir, String outDir) { 57 Future _run(String webDir, String outDir) {
47 var barback = new Barback(new _PolymerDeployProvider()); 58 var barback = new Barback(new _PolymerDeployProvider());
48 _initializeBarback(barback, webDir); 59 _initializeBarback(barback, webDir);
49 _attachListeners(barback); 60 _attachListeners(barback);
50 return _emitAllFiles(barback, webDir, outDir); 61 return _emitAllFiles(barback, webDir, outDir);
51 } 62 }
52 63
(...skipping 183 matching lines...) Expand 10 before | Expand all | Expand 10 after
236 print(e.message); 247 print(e.message);
237 _showUsage(parser); 248 _showUsage(parser);
238 return null; 249 return null;
239 } 250 }
240 } 251 }
241 252
242 _showUsage(parser) { 253 _showUsage(parser) {
243 print('Usage: dart package:polymer/deploy.dart [options]'); 254 print('Usage: dart package:polymer/deploy.dart [options]');
244 print(parser.getUsage()); 255 print(parser.getUsage());
245 } 256 }
OLDNEW
« no previous file with comments | « pkg/observe/lib/observe_html.dart ('k') | pkg/polymer/lib/polymer.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698