46 lines
893 B
JavaScript
Executable File
46 lines
893 B
JavaScript
Executable File
module.exports = function( grunt ) {
|
|
|
|
'use strict';
|
|
|
|
// Project configuration
|
|
grunt.initConfig( {
|
|
|
|
pkg: grunt.file.readJSON( 'package.json' ),
|
|
|
|
addtextdomain: {
|
|
options: {
|
|
textdomain: 'woo-dash',
|
|
},
|
|
update_all_domains: {
|
|
options: {
|
|
updateDomains: true
|
|
},
|
|
src: [ '*.php', '**/*.php', '!\.git/**/*', '!bin/**/*', '!node_modules/**/*', '!tests/**/*' ]
|
|
}
|
|
},
|
|
|
|
makepot: {
|
|
target: {
|
|
options: {
|
|
domainPath: '/languages',
|
|
exclude: [ '\.git/*', 'bin/*', 'node_modules/*', 'tests/*' ],
|
|
mainFile: 'woo-dash.php',
|
|
potFilename: 'woo-dash.pot',
|
|
potHeaders: {
|
|
poedit: true,
|
|
'x-poedit-keywordslist': true
|
|
},
|
|
type: 'wp-plugin',
|
|
updateTimestamp: true
|
|
}
|
|
}
|
|
},
|
|
} );
|
|
|
|
grunt.loadNpmTasks( 'grunt-wp-i18n' );
|
|
grunt.registerTask( 'i18n', ['addtextdomain', 'makepot'] );
|
|
|
|
grunt.util.linefeed = '\n';
|
|
|
|
};
|