I am attempting to template all files within a particular directory and save the output in the bin/admin
folder, where each destination file will have the same name as its corresponding source file. However, I am facing an issue with specifying the dest
in data
, as it appears to only accept the filename and not a destination directory.
module.exports = function(grunt) {
grunt.initConfig({
'template': {
'process-html-template': {
'options': {
'data': {
'api_url': 'My blog post'
}
},
'files': {
'bin/admin/': ['src/admin/*'] // <-- Here
}
}
}
});
grunt.loadNpmTasks('grunt-template');
grunt.registerTask('default', ['template']);
}
Is there a way to template all files within the src/
directory and store them in a destination folder with the same name? I attempted using bin/admin/*
as the destination path, but that simply resulted in a file named *
within bin/admin
. I wish to avoid manually listing out every file within the source directory.