Generate resource bundle files in the JAVA properties file format from DUST file
npm install grunt-resource-bundle-generate~0.4.4
shell
npm install grunt-resource-bundle-generate --save-dev
`
Once the plugin has been installed, it may be enabled inside your Gruntfile with this line of JavaScript:
`js
grunt.loadNpmTasks('grunt-resource-bundle-generate');
`
You can run this task as below:
`js
grunt resource-bundle-generate
`
The "resource-bundle-generate" task
$3
In your project's Gruntfile, add a section named resource-bundle-generate to the data object passed into grunt.initConfig().
`js
grunt.initConfig({
resource-bundle-generate: {
options: {
// Task-specific options go here.
},
your_target: {
// Target-specific file lists and/or options go here.
},
},
});
`
$3
#### options.target
Type: String
Default value: 'resourceBundle '
A string value that is used to indicate the target root folder used for storing the generated resource bundle.
#### options.format
Type: String
Default value: '.properties '
A string value to indicate which format will be used as the resource bundle file, the value is ethier .properties or .json .
$3
`js
grunt.initConfig({
'resource-bundle-generate': {
app: {
options: {
target: 'resourceBundle',
format: '.properties'
},
src: ['app/templates//.dust', 'app-common/templates//.dust']
}
},
});
``