scaffold
This commit is contained in:
56
Gruntfile.js
Normal file
56
Gruntfile.js
Normal file
@@ -0,0 +1,56 @@
|
||||
module.exports = function( grunt ) {
|
||||
|
||||
'use strict';
|
||||
|
||||
// Project configuration
|
||||
grunt.initConfig( {
|
||||
|
||||
pkg: grunt.file.readJSON( 'package.json' ),
|
||||
|
||||
addtextdomain: {
|
||||
options: {
|
||||
textdomain: 'tonys-sportspress-enhancements',
|
||||
},
|
||||
update_all_domains: {
|
||||
options: {
|
||||
updateDomains: true
|
||||
},
|
||||
src: [ '*.php', '**/*.php', '!\.git/**/*', '!bin/**/*', '!node_modules/**/*', '!tests/**/*' ]
|
||||
}
|
||||
},
|
||||
|
||||
wp_readme_to_markdown: {
|
||||
your_target: {
|
||||
files: {
|
||||
'README.md': 'readme.txt'
|
||||
}
|
||||
},
|
||||
},
|
||||
|
||||
makepot: {
|
||||
target: {
|
||||
options: {
|
||||
domainPath: '/languages',
|
||||
exclude: [ '\.git/*', 'bin/*', 'node_modules/*', 'tests/*' ],
|
||||
mainFile: 'tonys-sportspress-enhancements.php',
|
||||
potFilename: 'tonys-sportspress-enhancements.pot',
|
||||
potHeaders: {
|
||||
poedit: true,
|
||||
'x-poedit-keywordslist': true
|
||||
},
|
||||
type: 'wp-plugin',
|
||||
updateTimestamp: true
|
||||
}
|
||||
}
|
||||
},
|
||||
} );
|
||||
|
||||
grunt.loadNpmTasks( 'grunt-wp-i18n' );
|
||||
grunt.loadNpmTasks( 'grunt-wp-readme-to-markdown' );
|
||||
grunt.registerTask( 'default', [ 'i18n','readme' ] );
|
||||
grunt.registerTask( 'i18n', ['addtextdomain', 'makepot'] );
|
||||
grunt.registerTask( 'readme', ['wp_readme_to_markdown'] );
|
||||
|
||||
grunt.util.linefeed = '\n';
|
||||
|
||||
};
|
||||
Reference in New Issue
Block a user