1 | const gulp = require('gulp'); |
||
2 | const gettext = require('gulp-gettext'); |
||
3 | const jshint = require('gulp-jshint'); |
||
0 ignored issues
–
show
Unused Code
introduced
by
![]() |
|||
4 | const plumber = require('gulp-plumber'); |
||
0 ignored issues
–
show
|
|||
5 | const rename = require('gulp-rename'); |
||
0 ignored issues
–
show
|
|||
6 | const sort = require('gulp-sort'); |
||
7 | const uglify = require('gulp-uglify'); |
||
0 ignored issues
–
show
|
|||
8 | const wppot = require('gulp-wp-pot'); |
||
9 | |||
10 | gulp.task('default', function() { |
||
11 | console.log('Use the following commands'); |
||
0 ignored issues
–
show
|
|||
12 | console.log('--------------------------'); |
||
13 | console.log('gulp wordpress-lang to compile the lsx-activities.pot, lsx-activities-en_EN.po and lsx-activities-en_EN.mo'); |
||
14 | }); |
||
15 | |||
16 | gulp.task('wordpress-pot', function(done) { |
||
17 | return gulp.src('**/*.php') |
||
0 ignored issues
–
show
Usage of the sequence operator is discouraged, since it may lead to obfuscated code.
The sequence or comma operator allows the inclusion of multiple expressions where only is permitted. The result of the sequence is the value of the last expression. This operator is most often used in Used in another places it can make code hard to read, especially when people do not realize it even exists as a seperate operator. This check looks for usage of the sequence operator in locations where it is not necessary and could be replaced by a series of expressions or statements. var a,b,c;
a = 1, b = 1, c= 3;
could just as well be written as: var a,b,c;
a = 1;
b = 1;
c = 3;
To learn more about the sequence operator, please refer to the MDN. ![]() |
|||
18 | .pipe(sort()) |
||
19 | .pipe(wppot({ |
||
20 | domain: 'lsx-activities', |
||
21 | package: 'lsx-activities', |
||
22 | bugReport: 'https://bitbucket.org/feedmycode/to-activites', |
||
23 | team: 'LightSpeed <[email protected]>' |
||
24 | })) |
||
25 | .pipe(gulp.dest('languages/lsx-activities.pot')), |
||
26 | done(); |
||
27 | }); |
||
28 | |||
29 | gulp.task('wordpress-po', function(done) { |
||
30 | return gulp.src('**/*.php') |
||
0 ignored issues
–
show
Usage of the sequence operator is discouraged, since it may lead to obfuscated code.
The sequence or comma operator allows the inclusion of multiple expressions where only is permitted. The result of the sequence is the value of the last expression. This operator is most often used in Used in another places it can make code hard to read, especially when people do not realize it even exists as a seperate operator. This check looks for usage of the sequence operator in locations where it is not necessary and could be replaced by a series of expressions or statements. var a,b,c;
a = 1, b = 1, c= 3;
could just as well be written as: var a,b,c;
a = 1;
b = 1;
c = 3;
To learn more about the sequence operator, please refer to the MDN. ![]() |
|||
31 | .pipe(sort()) |
||
32 | .pipe(wppot({ |
||
33 | domain: 'lsx-activities', |
||
34 | package: 'lsx-activities', |
||
35 | bugReport: 'https://bitbucket.org/feedmycode/to-activites', |
||
36 | team: 'LightSpeed <[email protected]>' |
||
37 | })) |
||
38 | .pipe(gulp.dest('languages/lsx-activities-en_EN.po')), |
||
39 | done(); |
||
40 | }); |
||
41 | |||
42 | gulp.task('wordpress-po-mo', gulp.series( ['wordpress-po'], function(done) { |
||
43 | return gulp.src('languages/lsx-activities-en_EN.po') |
||
0 ignored issues
–
show
Usage of the sequence operator is discouraged, since it may lead to obfuscated code.
The sequence or comma operator allows the inclusion of multiple expressions where only is permitted. The result of the sequence is the value of the last expression. This operator is most often used in Used in another places it can make code hard to read, especially when people do not realize it even exists as a seperate operator. This check looks for usage of the sequence operator in locations where it is not necessary and could be replaced by a series of expressions or statements. var a,b,c;
a = 1, b = 1, c= 3;
could just as well be written as: var a,b,c;
a = 1;
b = 1;
c = 3;
To learn more about the sequence operator, please refer to the MDN. ![]() |
|||
44 | .pipe(gettext()) |
||
45 | .pipe(gulp.dest('languages')), |
||
46 | done(); |
||
47 | })); |
||
48 | |||
49 | gulp.task('wordpress-lang', gulp.series( ['wordpress-pot', 'wordpress-po-mo'] , function(done) { |
||
50 | done(); |
||
51 | })); |
||
52 |