mirror of
https://github.com/nasa/openmct.git
synced 2025-01-18 10:46:42 +00:00
[Templates] Add parameter names for required templates
This commit is contained in:
parent
f2e4b01721
commit
852faf061e
@ -52,12 +52,18 @@ function injectRequireArgument(sourceCode, templateUrls) {
|
||||
|
||||
templateUrls = _.uniq(templateUrls);
|
||||
|
||||
// Add arguments for source paths...
|
||||
index = lines.map(_.trim).indexOf("'legacyRegistry'");
|
||||
|
||||
lines = lines.slice(0, index).concat(templateUrls.map(function (url) {
|
||||
return " \"text!./res/" + url + "\",";
|
||||
}).concat(lines.slice(index)));
|
||||
|
||||
/// ...and for arguments
|
||||
index = lines.map(_.trim).indexOf("legacyRegistry");
|
||||
lines = lines.slice(0, index).concat(templateUrls.map(function (url) {
|
||||
return " " + toTemplateName(url) + ",";
|
||||
}).concat(lines.slice(index)));
|
||||
|
||||
return lines.join('\n');
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user