Closed thib-rdr closed 5 years ago
Hi @thib-rdr, is this issue still relevant? If so, could you create a PR to address this, please? If not, could you close the issue, please?
I was not able to recreate this problem with a folder with a dot in its name that contained a template. gulp-angular-templatecache did not crash and produced this expected output:
angular.module("app").run(["$templateCache",function(t){t.put("app/testfolder.withdot/simontemplate.html","<p>This is a template by simon</p>")
Closing this issue due to age of issue and failure to recreate. Perhaps a fix was already done or a dependency that caused this was updated in the meantime. If this issue persists, please add full STRs and sample when reopening.
I just recreated this problem by accident:
components
|
--- news-item-title.tpl.html
|
--- news-item-title.tpl.html
I'd accidentally named my folder with the same convention, and in this case exactly the same name, as my template files.
Hope it helps!
@ashclarke, thanks for the repro. I'm trying to weigh how much of a use-case a folder with a dot may be. It's perhaps not unusual but I'm struggling to determine whether it's more than an edge case. I'd love to review a PR if you have time and inclination to dive further into it.
No worries. Wouldn’t mind looking into it - might be able to have a bash at the weekend.
@ashclarke, that would be very appreciated. No rush. Just happy to hear willingness to contribute. If you do end up getting into it, could you please add appropriate tests, too?
Thank you very much!
This happens when the gulp.src
glob matches a directory. This can happen with templates/**/*.html
and a directory ending with .html
or with templates/**
and any directory.
Fixed by PR #171.
Hi all,
When using
angularTemplatecache()
to concatenate all my templates to a template.js file, it crashes when a folder with a dot is present in the project.TypeError: Cannot read property 'toString' of null at templateCacheFile (path/node_modules/gulp-angular-templatecache/index.js:89:36) at wrappedMapper (path/node_modules/event-stream/node_modules/map-stream/index.js:84:19)
Thanks !