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

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: Blacklist '.DS_Store' files from publish. 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
Index: utils/pub/validator/lib.dart
diff --git a/utils/pub/validator/lib.dart b/utils/pub/validator/lib.dart
index 64f44c6365f5694c8468c8b73d513a0a171a7416..9437cf0a75157a34e6a0e33ee91beaa1163f620c 100644
--- a/utils/pub/validator/lib.dart
+++ b/utils/pub/validator/lib.dart
@@ -23,19 +23,20 @@ class LibValidator extends Validator {
var libDir = join(entrypoint.root.dir, "lib");
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);
}
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.");
nweiz 2012/12/12 21:21:21 Nit: why "Otherwise" here and "Without that" in th
Bob Nystrom 2012/12/12 21:45:36 It felt weird to me to have "without that" referri
}
});
});

Powered by Google App Engine
This is Rietveld 408576698