47 lines
914 B
JavaScript
Executable File
47 lines
914 B
JavaScript
Executable File
/* eslint-disable */
|
|
module.exports = function( grunt ) {
|
|
|
|
'use strict';
|
|
|
|
// Project configuration
|
|
grunt.initConfig( {
|
|
|
|
pkg: grunt.file.readJSON( 'package.json' ),
|
|
|
|
addtextdomain: {
|
|
options: {
|
|
textdomain: 'wc-admin',
|
|
},
|
|
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: 'wc-admin.php',
|
|
potFilename: 'wc-admin.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';
|
|
|
|
};
|