Open Codeschmied opened 7 years ago
Hi,
looks correct at first glance and this is kinda hard to figure out without being able to access the sources / file structure.
From the error message I would guess it is an issue within any of the templates (most likely the index.html since the other seems to run find), i.e., please recheck all <%= render('path/to/content.tpl.html') %>
statements.
Alternatively: Could you try to split the template into 2 subtasks, like:
template: {
options: {
cwd:"app/pages/"
},
slaveGame: {
files: {
'app/slaveGame.html': ['app/src/slaveGame.tpl.html']
}
},
root: {
files: {
'app/index.html': ['app/src/index.tpl.html']
}
}
As I said, the error does not depend on any file. All files have their render-tag correct. The error occurs when I include both files. The order does not matter, the error comes after the first file has been processed. I tried your subtask approach. The subtasks seem to not be interpreted. The tool does not try to process them. Could you maybe build a running example that has more than one file?
Codesmied, you're right, quickfix:
go into templates.js, look for "var originalOptions = evaluateFunctions(options);" in line #97, move it from the including .each as it not necessary to evaluate them in each iteration, so it shoud look like:
`
var originalOptions = evaluateFunctions(options);
// Iterate over all specified file groups.
this.files.forEach(function(file) {
var translations = options.translations || {'default': {}};
// Iterate over all translations provided
_.each(translations, function(currentTranslation, language) {
`
Both files work fine on their own, but as soon as I include both in my files-object, i get an error message (see below)
this is my filestructure: