mirror of
https://ghproxy.net/https://github.com/elementor/activity-log.git
synced 2025-10-04 23:50:55 +08:00
123 lines
No EOL
2.1 KiB
JavaScript
123 lines
No EOL
2.1 KiB
JavaScript
/**
|
|
* ARYO Activity Log Makefile
|
|
*/
|
|
'use strict';
|
|
|
|
module.exports = function(grunt) {
|
|
|
|
require('matchdep').filterDev('grunt-*').forEach( grunt.loadNpmTasks );
|
|
|
|
// Project configuration.
|
|
grunt.initConfig( {
|
|
pkg: grunt.file.readJSON('package.json'),
|
|
|
|
checktextdomain: {
|
|
standard: {
|
|
options:{
|
|
text_domain: 'aryo-aal',
|
|
keywords: [
|
|
// WordPress keywords
|
|
'__:1,2d',
|
|
'_e:1,2d',
|
|
'_x:1,2c,3d',
|
|
'esc_html__:1,2d',
|
|
'esc_html_e:1,2d',
|
|
'esc_html_x:1,2c,3d',
|
|
'esc_attr__:1,2d',
|
|
'esc_attr_e:1,2d',
|
|
'esc_attr_x:1,2c,3d',
|
|
'_ex:1,2c,3d',
|
|
'_n:1,2,4d',
|
|
'_nx:1,2,4c,5d',
|
|
'_n_noop:1,2,3d',
|
|
'_nx_noop:1,2,3c,4d'
|
|
]
|
|
},
|
|
files: [ {
|
|
src: [
|
|
'classes/*.php',
|
|
'language/*.php',
|
|
'*.php'
|
|
],
|
|
expand: true
|
|
} ]
|
|
}
|
|
},
|
|
|
|
bumpup: {
|
|
options: {
|
|
updateProps: {
|
|
pkg: 'package.json'
|
|
}
|
|
},
|
|
file: 'package.json'
|
|
},
|
|
|
|
replace: {
|
|
plugin_main: {
|
|
src: [ 'aryo-activity-log.php' ],
|
|
overwrite: true,
|
|
replacements: [
|
|
{
|
|
from: /Version: \d{1,1}\.\d{1,2}\.\d{1,2}/g,
|
|
to: 'Version: <%= pkg.version %>'
|
|
}
|
|
]
|
|
},
|
|
|
|
readme: {
|
|
src: [ 'readme.txt' ],
|
|
overwrite: true,
|
|
replacements: [
|
|
{
|
|
from: /Stable tag: \d{1,1}\.\d{1,2}\.\d{1,2}/g,
|
|
to: 'Stable tag: <%= pkg.version %>'
|
|
}
|
|
]
|
|
}
|
|
},
|
|
|
|
shell: {
|
|
git_add_all : {
|
|
command: [
|
|
'git add --all',
|
|
'git commit -m "Bump to <%= pkg.version %>"'
|
|
].join( '&&' )
|
|
}
|
|
},
|
|
|
|
release: {
|
|
options: {
|
|
bump: false,
|
|
npm: false,
|
|
tagName: 'v<%= version %>',
|
|
commitMessage: 'released v<%= version %>',
|
|
tagMessage: 'Tagged as v<%= version %>'
|
|
}
|
|
},
|
|
|
|
wp_readme_to_markdown: {
|
|
github: {
|
|
files: {
|
|
'README.md': 'readme.txt'
|
|
}
|
|
}
|
|
}
|
|
|
|
} );
|
|
|
|
// Default task(s).
|
|
grunt.registerTask( 'default', [
|
|
'checktextdomain',
|
|
'wp_readme_to_markdown'
|
|
] );
|
|
|
|
grunt.registerTask( 'publish', [
|
|
'checktextdomain',
|
|
'bumpup',
|
|
'replace',
|
|
'wp_readme_to_markdown',
|
|
'shell:git_add_all',
|
|
'release'
|
|
] );
|
|
}; |