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

Side by Side Diff: sdk/lib/_internal/pub/bin/pub.dart

Issue 141113011: Support directories other than "web" in pub build. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Revise. 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 | sdk/lib/_internal/pub/lib/src/barback.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 import 'dart:async'; 5 import 'dart:async';
6 import 'dart:io'; 6 import 'dart:io';
7 7
8 import 'package:args/args.dart'; 8 import 'package:args/args.dart';
9 import 'package:path/path.dart' as path; 9 import 'package:path/path.dart' as path;
10 10
11 import '../lib/src/command.dart'; 11 import '../lib/src/command.dart';
12 import '../lib/src/exit_codes.dart' as exit_codes; 12 import '../lib/src/exit_codes.dart' as exit_codes;
13 import '../lib/src/io.dart'; 13 import '../lib/src/io.dart';
14 import '../lib/src/log.dart' as log; 14 import '../lib/src/log.dart' as log;
15 import '../lib/src/sdk.dart' as sdk; 15 import '../lib/src/sdk.dart' as sdk;
16 import '../lib/src/utils.dart'; 16 import '../lib/src/utils.dart';
17 17
18 void main(List<String> arguments) { 18 void main(List<String> arguments) {
19 ArgResults options; 19 ArgResults options;
20 20
21 try { 21 try {
22 options = PubCommand.pubArgParser.parse(arguments); 22 options = PubCommand.pubArgParser.parse(arguments,
23 allowTrailingOptions: true);
23 } on FormatException catch (e) { 24 } on FormatException catch (e) {
24 log.error(e.message); 25 log.error(e.message);
25 log.error('Run "pub help" to see available options.'); 26 log.error('Run "pub help" to see available options.');
26 flushThenExit(exit_codes.USAGE); 27 flushThenExit(exit_codes.USAGE);
27 return; 28 return;
28 } 29 }
29 30
30 if (options['version']) { 31 if (options['version']) {
31 log.message('Pub ${sdk.version}'); 32 log.message('Pub ${sdk.version}');
32 return; 33 return;
(...skipping 59 matching lines...) Expand 10 before | Expand all | Expand 10 after
92 if (Platform.operatingSystem != 'windows') return null; 93 if (Platform.operatingSystem != 'windows') return null;
93 94
94 return runProcess('ver', []).then((result) { 95 return runProcess('ver', []).then((result) {
95 if (result.stdout.join('\n').contains('XP')) { 96 if (result.stdout.join('\n').contains('XP')) {
96 log.error('Sorry, but pub is not supported on Windows XP.'); 97 log.error('Sorry, but pub is not supported on Windows XP.');
97 return flushThenExit(exit_codes.USAGE); 98 return flushThenExit(exit_codes.USAGE);
98 } 99 }
99 }); 100 });
100 }); 101 });
101 } 102 }
OLDNEW
« no previous file with comments | « no previous file | sdk/lib/_internal/pub/lib/src/barback.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698