linnovate / meanio

meanio core module
MIT License
54 stars 73 forks source link

Modules/Packages with hyphenated names cannot be injected #58

Open jwebbdev opened 9 years ago

jwebbdev commented 9 years ago

The meanio module creation expects the name of the module and the directory that contains the module to be the same. If a module is created with a hyphenated name you can't use it with dependency injection since it's not a valid variable name.

The dependency system used doesn't seem to support an explicit notation (like Angular's injection) such as

myPackage.register(['hyphenated-package', function(hyphenatedPackage) { 
 ...
}]);

If this is the case, as it seems to be, then the CLI probably shouldn't allow hyphenated package names with create, or some workaround should be found. If one already exists, I'd love to know it :)