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

Unified Diff: utils/pub/validator/lib.dart

Issue 11557008: Make pub publish more user friendly: (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Merge in path changes. 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « utils/pub/validator.dart ('k') | utils/pub/validator/license.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: utils/pub/validator/lib.dart
diff --git a/utils/pub/validator/lib.dart b/utils/pub/validator/lib.dart
index 8b9707f7b75fc9a9759e1f72c38f8e8a7af9d476..39b71afa45383b2bc9d210c7804b5e37e4dc9292 100644
--- a/utils/pub/validator/lib.dart
+++ b/utils/pub/validator/lib.dart
@@ -24,8 +24,8 @@ class LibValidator extends Validator {
return dirExists(libDir).chain((libDirExists) {
if (!libDirExists) {
- errors.add('Your package must have a "lib/" directory so users have '
- 'something to import.');
+ errors.add('You must have a "lib" directory.\n'
+ "Without that, users cannot import any code from your package.");
return new Future.immediate(null);
}
@@ -39,11 +39,12 @@ class LibValidator extends Validator {
return listDir(libDir).transform((files) {
files = files.map((file) => relativeTo(file, libDir));
if (files.isEmpty) {
- errors.add('The "lib/" directory may not be empty so users have '
- 'something to import');
+ errors.add('You must have a non-empty "lib" directory.\n'
+ "Without that, users cannot import any code from your package.");
} else if (files.length == 1 && files.first == "src") {
- errors.add('The "lib/" directory must contain something other than '
- '"src/" so users have something to import');
+ errors.add('The "lib" directory must contain something other than '
+ '"src".\n'
+ "Otherwise, users cannot import any code from your package.");
}
});
});
« no previous file with comments | « utils/pub/validator.dart ('k') | utils/pub/validator/license.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698