Closed noway closed 11 years ago
*
is just shortcut for file
var moduleNameTemplate = template(moduleName.replace('*', '<%= file %>'));
I know that it is not obvious, but now I can't change that behaviour. It might break backward capability.
Maybe introduce new variable that contains match result? In order to be able do this:
"modules": {
"<%= match %>-tpl": "tpls/*.min.html",
}
Value "tpls/.min.html" is glob-pattern, so it can be like this "tpls//pewpew/.min.html" or this "tpls//compiled.html" And what "match" suppose to be a in this case I do not know.
Oh, right. Maybe make array, like what /regexp/.exec()
return? But this start look too complex.
Yes, Array is too complex.
*
(asterisk) in module name always returns file basename, despite of matching pattern. For example:would declare this modules
instead of
That behavior hardcoded here: https://github.com/azproduction/lmd/blob/master/lib/lmd_common.js#L922
Currently i fix that with this workaround: