/** * Gulp File * * 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'), rename = require("gulp-rename"), cleanCSS = require('gulp-clean-css'), jsmin = require('gulp-jsmin'); /* POT file task */ gulp.task('pot', function () { return gulp.src('**/*.php') .pipe(sort()) .pipe(wpPot({ package: 'Press Elements', domain: 'press-elements', //textdomain destFile: 'press-elements.pot', lastTranslator: '', team: 'Rami Yushuvaev <r_a_m_i@hotmail.com>' })) .pipe(gulp.dest('language')); }); /* Text-domain task */ gulp.task('textdomain', function () { var options = { text_domain: 'press-elements', 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)) }); /* Styles task */ gulp.task('css', function () { return gulp.src('assets/css/*.css') .pipe(cleanCSS()) .pipe(rename({suffix:".min"})) .pipe(gulp.dest('assets/css/')); }); /* Scripts task */ gulp.task('js', function () { return gulp.src('assets/js/*.js') .pipe(jsmin()) .pipe(rename({suffix: '.min'})) .pipe(gulp.dest('assets/js/')); }); /* Default Gulp task */ gulp.task('default', function () { // Run all the tasks! gulp.start('textdomain','pot','css','js'); });
Name | Type | Size | Permission | Actions |
---|---|---|---|---|
assets | Folder | 0555 |
|
|
language | Folder | 0555 |
|
|
libs | Folder | 0555 |
|
|
widgets | Folder | 0555 |
|
|
gulpfile.js | File | 1.99 KB | 0644 |
|
index.php | File | 16.03 KB | 0555 |
|
package.json | File | 338 B | 0644 |
|
press-elements-admin.php | File | 15.89 KB | 0644 |
|
press-elements-freemius.php | File | 18.47 KB | 0555 |
|
press-elements.php | File | 33.62 KB | 0555 |
|
readme.txt | File | 13.96 KB | 0644 |
|
screenshot-1.png | File | 84.42 KB | 0644 |
|
screenshot-10.png | File | 243.2 KB | 0644 |
|
screenshot-11.png | File | 444.5 KB | 0644 |
|
screenshot-12.png | File | 380.58 KB | 0644 |
|
screenshot-13.png | File | 256.33 KB | 0644 |
|
screenshot-14.png | File | 494.6 KB | 0644 |
|
screenshot-2.png | File | 217.17 KB | 0644 |
|
screenshot-3.png | File | 211.09 KB | 0644 |
|
screenshot-4.png | File | 950.43 KB | 0644 |
|
screenshot-5.png | File | 303.96 KB | 0644 |
|
screenshot-6.png | File | 246.99 KB | 0644 |
|
screenshot-7.png | File | 207.29 KB | 0644 |
|
screenshot-8.png | File | 124.14 KB | 0644 |
|
screenshot-9.png | File | 247.05 KB | 0644 |
|