renderCopyrightTemplate function
Takes a .copyright file and produces the copyright string to append to each file. Replaces the first regex group with the current year.
Implementation
String renderCopyrightTemplate(String copyrightFileString) {
return mustache.Template(copyrightFileString)
.renderString({'year': DateTime.now().year});
}