generated from rahulsprajapati/wp-plugin-template
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Gruntfile.js
35 lines (30 loc) · 1.27 KB
/
Gruntfile.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
'use strict';
module.exports = function ( grunt ) {
grunt.initConfig( {
// Make POT file - Internationalize WordPress plugins.
// Ref. https://www.npmjs.com/package/grunt-wp-i18n
makepot: {
plugin: {
options: {
cwd: './', // Directory of files to internationalize.
domainPath: 'languages/', // Where to save the POT file.
exclude: [ 'node_modules/*', '.phpintel/*', 'vendor/*' ], // List of files or directories to ignore.
mainFile: 'plugin.php', // Main project file.
potFilename: 'unpublish-media-endpoint.pot', // Name of the POT file.
potHeaders: { // Headers to add to the generated POT file.
poedit: true, // Includes common Poedit headers.
'Last-Translator': 'Rahul Prajapati <[email protected]>',
'Language-Team': 'Dev',
'report-msgid-bugs-to': 'https://github.com/rahulsprajapati/unpublish-media-endpoint/issues',
'x-poedit-keywordslist': true, // Include a list of all possible gettext functions.
},
type: 'wp-plugin', // Type of project (wp-plugin or wp-theme).
updateTimestamp: true, // Whether the POT-Creation-Date should be updated without other changes.
},
},
},
} );
grunt.loadNpmTasks( 'grunt-wp-i18n' );
// Register task
grunt.registerTask( 'default', [ 'makepot' ] );
};