|
1 | | -module.exports = function( grunt ) { |
2 | | - |
3 | | - 'use strict'; |
4 | | - |
5 | | - // Project configuration |
6 | | - grunt.initConfig( { |
7 | | - |
8 | | - pkg: grunt.file.readJSON( 'package.json' ), |
9 | | - |
10 | | - addtextdomain: { |
11 | | - options: { |
12 | | - textdomain: 'wp-disable-image-sizes', |
13 | | - }, |
14 | | - update_all_domains: { |
15 | | - options: { |
16 | | - updateDomains: true |
17 | | - }, |
18 | | - src: [ '*.php', '**/*.php', '!\.git/**/*', '!bin/**/*', '!node_modules/**/*', '!tests/**/*' ] |
19 | | - } |
20 | | - }, |
21 | | - |
22 | | - wp_readme_to_markdown: { |
23 | | - your_target: { |
24 | | - files: { |
25 | | - 'README.md': 'readme.txt' |
26 | | - } |
27 | | - }, |
28 | | - }, |
29 | | - |
30 | | - makepot: { |
31 | | - target: { |
32 | | - options: { |
33 | | - domainPath: '/languages', |
34 | | - exclude: [ '\.git/*', 'bin/*', 'node_modules/*', 'tests/*' ], |
35 | | - mainFile: 'wp-disable-image-sizes.php', |
36 | | - potFilename: 'wp-disable-image-sizes.pot', |
37 | | - potHeaders: { |
38 | | - poedit: true, |
39 | | - 'x-poedit-keywordslist': true |
40 | | - }, |
41 | | - type: 'wp-plugin', |
42 | | - updateTimestamp: true |
43 | | - } |
44 | | - } |
45 | | - }, |
46 | | - } ); |
47 | | - |
48 | | - grunt.loadNpmTasks( 'grunt-wp-i18n' ); |
49 | | - grunt.loadNpmTasks( 'grunt-wp-readme-to-markdown' ); |
50 | | - grunt.registerTask( 'default', [ 'i18n','readme' ] ); |
51 | | - grunt.registerTask( 'i18n', ['addtextdomain', 'makepot'] ); |
52 | | - grunt.registerTask( 'readme', ['wp_readme_to_markdown'] ); |
53 | | - |
54 | | - grunt.util.linefeed = '\n'; |
| 1 | +module.exports = function ( grunt ) { |
| 2 | + |
| 3 | + 'use strict'; |
| 4 | + |
| 5 | + // Project configuration |
| 6 | + grunt.initConfig({ |
| 7 | + |
| 8 | + pkg: grunt.file.readJSON('package.json'), |
| 9 | + |
| 10 | + addtextdomain: { |
| 11 | + options: { |
| 12 | + textdomain: 'wp-disable-image-sizes', |
| 13 | + }, |
| 14 | + update_all_domains: { |
| 15 | + options: { |
| 16 | + updateDomains: true |
| 17 | + }, |
| 18 | + src: [ '*.php', '**/*.php', '!\.git/**/*', '!bin/**/*', '!node_modules/**/*', '!tests/**/*' ] |
| 19 | + } |
| 20 | + }, |
| 21 | + |
| 22 | + wp_readme_to_markdown: { |
| 23 | + your_target: { |
| 24 | + files: { |
| 25 | + 'README.md': 'readme.txt' |
| 26 | + } |
| 27 | + }, |
| 28 | + }, |
| 29 | + |
| 30 | + makepot: { |
| 31 | + target: { |
| 32 | + options: { |
| 33 | + domainPath: '/languages', |
| 34 | + exclude: [ '\.git/*', 'bin/*', 'node_modules/*', 'tests/*' ], |
| 35 | + mainFile: 'wp-disable-image-sizes.php', |
| 36 | + potFilename: 'wp-disable-image-sizes.pot', |
| 37 | + potHeaders: { |
| 38 | + poedit: true, |
| 39 | + 'x-poedit-keywordslist': true |
| 40 | + }, |
| 41 | + type: 'wp-plugin', |
| 42 | + updateTimestamp: true |
| 43 | + } |
| 44 | + } |
| 45 | + }, |
| 46 | + }); |
| 47 | + |
| 48 | + grunt.loadNpmTasks('grunt-wp-i18n'); |
| 49 | + grunt.loadNpmTasks('grunt-wp-readme-to-markdown'); |
| 50 | + grunt.registerTask('default', [ 'i18n','readme' ]); |
| 51 | + grunt.registerTask('i18n', ['addtextdomain', 'makepot']); |
| 52 | + grunt.registerTask('readme', ['wp_readme_to_markdown']); |
| 53 | + |
| 54 | + grunt.util.linefeed = '\n'; |
55 | 55 |
|
56 | 56 | }; |
0 commit comments