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

Side by Side Diff: utils/pub/command_lish.dart

Issue 11475046: Add Bob's path library to pub. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 8 years 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 | utils/pub/curl_client.dart » ('j') | utils/pub/io.dart » ('J')
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 library command_lish; 5 library command_lish;
6 6
7 import 'dart:io'; 7 import 'dart:io';
8 import 'dart:json'; 8 import 'dart:json';
9 import 'dart:uri'; 9 import 'dart:uri';
10 10
11 import '../../pkg/args/lib/args.dart'; 11 import '../../pkg/args/lib/args.dart';
12 import '../../pkg/http/lib/http.dart' as http; 12 import '../../pkg/http/lib/http.dart' as http;
13 import 'git.dart' as git;
14 import 'io.dart';
15 import 'oauth2.dart' as oauth2;
16 import 'path.dart' as path;
Bob Nystrom 2012/12/08 03:36:53 Do you need path here? I don't see any uses of it
nweiz 2012/12/08 03:43:45 Good catch. I probably changed something to use pa
13 import 'pub.dart'; 17 import 'pub.dart';
14 import 'io.dart';
15 import 'git.dart' as git;
16 import 'oauth2.dart' as oauth2;
17 import 'validator.dart'; 18 import 'validator.dart';
18 19
19 // TODO(nweiz): Make "publish" the primary name for this command. See issue 20 // TODO(nweiz): Make "publish" the primary name for this command. See issue
20 // 6949. 21 // 6949.
21 /// Handles the `lish` and `publish` pub commands. 22 /// Handles the `lish` and `publish` pub commands.
22 class LishCommand extends PubCommand { 23 class LishCommand extends PubCommand {
23 final description = "publish the current package to pub.dartlang.org"; 24 final description = "publish the current package to pub.dartlang.org";
24 final usage = "pub publish [options]"; 25 final usage = "pub publish [options]";
25 final aliases = const ["lish", "lush"]; 26 final aliases = const ["lish", "lush"];
26 27
(...skipping 160 matching lines...) Expand 10 before | Expand all | Expand 10 after
187 var s = warnings.length == 1 ? '' : 's'; 188 var s = warnings.length == 1 ? '' : 's';
188 stdout.writeString("Package has ${warnings.length} warning$s. Upload " 189 stdout.writeString("Package has ${warnings.length} warning$s. Upload "
189 "anyway (y/n)? "); 190 "anyway (y/n)? ");
190 return readLine().transform((line) { 191 return readLine().transform((line) {
191 if (new RegExp(r"^[yY]").hasMatch(line)) return; 192 if (new RegExp(r"^[yY]").hasMatch(line)) return;
192 throw "Package upload canceled."; 193 throw "Package upload canceled.";
193 }); 194 });
194 }); 195 });
195 } 196 }
196 } 197 }
OLDNEW
« no previous file with comments | « no previous file | utils/pub/curl_client.dart » ('j') | utils/pub/io.dart » ('J')

Powered by Google App Engine
This is Rietveld 408576698