Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

path_to_data to accept array of strings inside Gruntfile too? #3

Open
scottlet opened this issue Sep 10, 2013 · 2 comments
Open

path_to_data to accept array of strings inside Gruntfile too? #3

scottlet opened this issue Sep 10, 2013 · 2 comments

Comments

@scottlet
Copy link

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 :)

@shaekuronen
Copy link
Owner

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!

@scottlet
Copy link
Author

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.', meaning each release has a different path for static resources. Then in apache I can set all css/js/images to be cacheable for 1+ years and not worry about stale stuff being accidentally served.

@scottlet scottlet reopened this Sep 22, 2013
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants