0.1.14 • Published 8 years ago

grunt-atlassian-soy v0.1.14

Weekly downloads
-
License
MIT
Repository
bitbucket
Last release
8 years ago

grunt-atlassian-soy

Uses Atlassian's Soy compiler to compile Soy files to JS. Optionaly compiles soy templates for each I18n file specified.

You can find the required JAR file in Atlassian's Soy Template Repository.

Getting Started

This plugin requires Grunt >=0.4.0

If you haven't used Grunt before, be sure to check out the Getting Started guide, as it explains how to create a Gruntfile as well as install and use Grunt plugins. Once you're familiar with that process, you may install this plugin with this command:

$ npm install --save-dev grunt-atlassian-soy

Usage

require('load-grunt-tasks')(grunt); // npm install --save-dev load-grunt-tasks

grunt.initConfig({
    soy: {
        soy: {
            target1: {
                basedir:'base',
                glob:'*.soy',
                outputPath:'out',
                extension:'.soy.js',
                i18n: 'name_of_i18n_file.properties',
                soyToJsJarPath:'path/to/jar.jar',
                propPath:'path/to/i18n/files',
            },
            target2: {
                basedir:'base',
                glob:'*.soy',
                outputPath:'out',
                extension:'.soy.js',
                i18n: 'name_of_i18n_file.properties',
                soyToJsJarPath:'path/tojar.jar',
                propPath:'path/to/i18n/files',
            }
    }
});

grunt.registerTask('default', ['soy']);

Options

Because of how Grunt works an additional level of configuration is required since the compiler runs all tasks in parallel.

basedir, glob, outputPath, extension, i18n

See Atlassian's Readme

soyToJSJarPath

Type: String

The path to the Soy Template compiler JAR file

propPath

Type: String

The directory containing I18n files

0.1.15

8 years ago

0.1.14

8 years ago

0.1.13

8 years ago

0.1.12

8 years ago

0.1.11

8 years ago

0.1.10

8 years ago

0.1.9

8 years ago

0.1.8

8 years ago

0.1.7

8 years ago

0.1.6

8 years ago

0.1.5

8 years ago

0.1.4

8 years ago

0.1.3

8 years ago

0.1.2

8 years ago

0.1.1

8 years ago

0.1.0

8 years ago