Only generate top-level README in NodeJS packages
@@ -962,7 +962,8 @@ func (mod *modContext) gen(fs fs) error {
fs.add(p, []byte(contents))
}
- // Ensure that the target module directory contains a README.md file.
+ // Ensure that the top-level (provider) module directory contains a README.md file.
+ if mod.mod == "" {
readme := mod.pkg.Language["nodejs"].(NodePackageInfo).Readme
if readme == "" {
readme = mod.pkg.Description
@@ -980,6 +981,7 @@ func (mod *modContext) gen(fs fs) error {
readme += "\n"
}
fs.add(path.Join(mod.mod, "README.md"), []byte(readme))
+ }
// Utilities, config
switch mod.mod {
