pd93
Is this the best way to create a list (that can be empty) for use with templates?
You could use
compact
instead of initial
. This would remove any empty items from your array. Alternatively, you can build a JSON string and call fromJson
. There are probably other ways too.
Regarding ref
. By design, it only accepts a single ActionNode
(i.e. One set of {{...}}
) so if
statements are not possible. ref
is designed for you to be able to refer to other variables while maintaining their type, not for logic. It is actually a side-effect of the templating engine that functions are available for use in ref
, but we felt this was acceptable/useful.3 replies
Working out why a task with sources and generates is considered up to date
The generated hash is stored in the
.task
directory. However, there is no way to see which files this hash represents. The behaviour that you're describing shouldn't be happening though. I created a full example similar to yours that seems to work fine
3 replies