-
Notifications
You must be signed in to change notification settings - Fork 427
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Automation #635
base: develop
Are you sure you want to change the base?
Automation #635
Changes from all commits
4b0c8e0
da122cf
bf8f7b0
e894e0f
5d4d7fb
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
/node_modules |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,61 @@ | ||
/** | ||
* Give Gulp File | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Incorrect comment. |
||
* | ||
* Used for automating development tasks. | ||
*/ | ||
|
||
/* Modules (Can be installed with npm install command using package.json) | ||
------------------------------------- */ | ||
var gulp = require('gulp'), | ||
sort = require('gulp-sort'), | ||
wpPot = require('gulp-wp-pot'), | ||
checktextdomain = require('gulp-checktextdomain'); | ||
|
||
/* POT file task | ||
------------------------------------- */ | ||
gulp.task('pot', function () { | ||
return gulp.src('**/*.php') | ||
.pipe(sort()) | ||
.pipe(wpPot({ | ||
package: 'TGM Plugin Activation', | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Please put these TGMPA-specific values into |
||
domain: 'tgmpa', //textdomain | ||
destFile: 'tgmpa.pot', | ||
lastTranslator: '', | ||
team: 'TGMPA' | ||
})) | ||
.pipe(gulp.dest('languages')); | ||
}); | ||
|
||
/* Text-domain task | ||
------------------------------------- */ | ||
gulp.task('textdomain', function () { | ||
var options = { | ||
text_domain: 'tgmpa', | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Again, read from package.json. |
||
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' | ||
], | ||
correct_domain: true | ||
}; | ||
return gulp.src('**/*.php') | ||
.pipe(checktextdomain(options)) | ||
}); | ||
|
||
/* Default Gulp task | ||
------------------------------------- */ | ||
gulp.task('default', function () { | ||
// Run all the tasks! | ||
gulp.start('textdomain','pot'); | ||
}); |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
{ | ||
"name": "TGMPA", | ||
"private": true, | ||
"devDependencies": { | ||
"fs-extra": "^0.30.0", | ||
"gulp": "^3.9.1", | ||
"gulp-sort": "^2.0.0", | ||
"gulp-util": "^3.0.7", | ||
"gulp-wp-pot": "^1.2.2", | ||
"gulp-checktextdomain": "^1.0.2" | ||
} | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
These should be a separate PR please.