If there are empty files then npm-html2js starts pushing the content from the next file in the directory into the cache under the wrong filename.
e.g. in a directory with files A, B, C - where B is an empty file, the result is as follows:
angular.module('my.templates', [])
.run(['$templateCache', function($templateCache) {
$templateCache.put('A.html',
'<div>This is A</div>\n' +
'')
$templateCache.put('B.html',
'<div>This is C</div>\n' +
'')
}]);
If there are empty files then npm-html2js starts pushing the content from the next file in the directory into the cache under the wrong filename.
e.g. in a directory with files A, B, C - where B is an empty file, the result is as follows: