0.1.0 • Published 10 years ago

grunt-swig-localization v0.1.0

Weekly downloads
-
License
MIT
Repository
-
Last release
10 years ago

Grunt + Swig Static Localized Html Generator

Generates static html files using grunt and swig that are localized.

Installation

From command line

npm install grunt-swig-localization

Using package.json

{
    dependencies: {
        "grunt-swig-localization": "~0.1.0"
    }
}

Usage

To see an example project using this module check out https://github.com/kengoldfarb/grunt-swig-localization-examples

Example Gruntfile.js

module.exports = function(grunt) {

    grunt.initConfig({
        swigLocalization: {
			main: {
				src: ['templates/*.swig', 'templateData/*.json'],
	            outputDir: 'dist'
			}
        }
    });

    grunt.loadNpmTasks('grunt-swig-localization');

    grunt.registerTask('default', ['swigLocalization']);
};

File naming conventions

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

Tests

TODO

License

MIT