Grunt task for Java XTB generator - language file for Google Closure Library
This plugin requires Grunt ~0.4.1
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 grunt-xtb-generator --save-dev
Once the plugin has been installed, it may be enabled inside your Gruntfile with this line of JavaScript:
grunt.loadNpmTasks('grunt-xtb-generator');
In your project's Gruntfile, add a section named xtbGenerator
to the data object passed into grunt.initConfig()
.
grunt.initConfig({
xtbGenerator: {
options: {
// Task-specific options go here.
}
}
})
Type: String
Default value: 'python'
Python bin name. Useful for Linux where both Python 2 and 3 can be installed. Use Python 2 for Windows.
Type: String
Default value: 'bin/build/closurebuilder.py'
Path to closurebuilder.py file.
Type: Array
Default value: root: ['test/js'],
Path(s) for scan dependencies.
Type: String
Default value: 'test/js/app.js'
Main (root) file of the application.
Type: String
Default value: 'compiled'
How to write the dependencies output.
Type: String
Default value: 'bin/XtbGenerator.jar'
Path to XtbGenerator.jar file.
Type: Object
Default value: { translations_file: 'test/js-messages/messages.xtb', xtb_output_file: 'test/js-messages/messages.xtb', lang: 'cs' }
XtbGenerator options. See the documentation
Type: String
Default value: 'test/js-messages/messages.xtb'
Type: String
Default value: 'test/js-messages/messages.xtb'
Type: String
Default value: 'cs'
grunt.initConfig({
xtbGenerator: {
generate: {
options: {
builder: 'bin/build/closurebuilder.py',
root: ['test/js'],
input: 'test/js/app.js',
compiler_flags: {
translations_file: 'test/js-messages/custom_messages.xtb',
xtb_output_file: 'test/js-messages/custom_messages.xtb',
lang: 'cs'
}
}
}
}
})
In lieu of a formal styleguide, take care to maintain the existing coding style. Add unit tests for any new or changed functionality. Lint and test your code using Grunt.
0.1.0 First release