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
|
} |
}); |
}); |