grunt-ejs-static
grunt-ejs-static copied to clipboard
path_to_data to accept array of strings inside Gruntfile too?
I would love for the path_to_data option to be able to accept an array of strings as well as a string as it can inside of the data.json files. I'm trying to build an i18n enabled website and want to be able to run this inside of a Grunt custom task to loop through and build separate templates from a single source with multiple languages, eg: path_to_data: ['json/site.json', 'json/i18n/en.json'], path_to_data: ['json/site.json', 'json/i18n/de.json']
etc.
What do you think of this idea? If you like it, I'll happily fork this and provide a pull request if needed :)
This would be awesome feature to integrate. Took a quick look at your fork, looks really good. I'm pretty busy this week, but will have time over the weekend to work on this project. Thanks for forking, hadn't thought of integrating internationalization. Great idea!
Cool :)
I'm also modifying the thing to take globals direct from within grunt - not sure if it'd be that useful to anyone else, but I'm using it to build in versioning of static resources.
global: {
staticPath: '<%= yeoman.staticPath %>'
}
My static path is '$foo', which at build time in our CI environment is swapped for '1.0.