// {% javascripts 'assets/js/*' %}
// {% javascripts 'assets/js/*.js' %}
Matcher matcher = Pattern.compile("^(.*[/\\\\])\\*([.\\w+]*)$").matcher(templateName);
if (!matcher.find()) {
for (final AssetFile assetFile : new AssetDirectoryReader().setFilterExtension(fileTypes).setIncludeBundleDir(true).setProject(project).getAssetFiles()) {
if(assetFile.toString().equals(templateName)) {
virtualFiles.add(assetFile.getFile());
}
}
return virtualFiles;
}
String pathName = matcher.group(1);
String fileExtension = matcher.group(2).length() > 0 ? matcher.group(2) : null;
for (final AssetFile assetFile : new AssetDirectoryReader().setFilterExtension(fileTypes).setIncludeBundleDir(true).setProject(project).getAssetFiles()) {
if(fileExtension == null && assetFile.toString().matches(Pattern.quote(pathName) + "(?!.*[/\\\\]).*\\.\\w+")) {
virtualFiles.add(assetFile.getFile());
} else if(fileExtension != null && assetFile.toString().matches(Pattern.quote(pathName) + "(?!.*[/\\\\]).*" + Pattern.quote(fileExtension))) {
virtualFiles.add(assetFile.getFile());
}