Generates static html files using grunt and swig that are localized.
npm install grunt-swig-localization
{
dependencies: {
"grunt-swig-localization": "~0.1.0"
}
}
To see an example project using this module check out https://github.com/kengoldfarb/grunt-swig-localization-examples
module.exports = function(grunt) {
grunt.initConfig({
swigLocalization: {
main: {
src: ['templates/*.swig', 'templateData/*.json'],
outputDir: 'dist'
}
}
});
grunt.loadNpmTasks('grunt-swig-localization');
grunt.registerTask('default', ['swigLocalization']);
};
Template files must follow the format [name].html.swig and data files must follow the format [name]--[lang].json
Check out the examples for a typical file structure: https://github.com/kengoldfarb/grunt-swig-localization-examples
TODO
MIT