| Server IP : 39.106.62.82 / Your IP : 216.73.217.128 Web Server : nginx/1.14.1 System : Linux iz2ze1m0zmp2dk5c3j5ap5z 3.10.0-1127.19.1.el7.x86_64 #1 SMP Tue Aug 25 17:23:54 UTC 2020 x86_64 User : www ( 1000) PHP Version : 7.4.33 Disable Function : passthru,exec,system,putenv,chroot,chgrp,chown,shell_exec,popen,proc_open,pcntl_exec,ini_alter,ini_restore,dl,openlog,syslog,readlink,symlink,popepassthru,pcntl_alarm,pcntl_fork,pcntl_waitpid,pcntl_wait,pcntl_wifexited,pcntl_wifstopped,pcntl_wifsignaled,pcntl_wifcontinued,pcntl_wexitstatus,pcntl_wtermsig,pcntl_wstopsig,pcntl_signal,pcntl_signal_dispatch,pcntl_get_last_error,pcntl_strerror,pcntl_sigprocmask,pcntl_sigwaitinfo,pcntl_sigtimedwait,pcntl_exec,pcntl_getpriority,pcntl_setpriority,imap_open,apache_setenv MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : ON | Sudo : ON | Pkexec : ON Directory : /webdata/gohomesh.com/wp-content/plugins/members/ |
Upload File : |
// Style related.
var styleSRC = './css/*.css'; // Path to .css files.
var styleDestination = './css/'; // Path to place the minified CSS files.
// JS related.
var jsSource = './js/*.js'; // Path to JS vendor folder.
var jsDestination = './js/'; // Path to place the minified JS files.
// Translation related.
var text_domain = 'members'; // Your textdomain here.
var translationFile = 'members.pot'; // Name of the transalation file.
var translationDestination = './lang'; // Where to save the translation files.
var packageName = 'members'; // Package name.
var bugReport = 'https://memberpress.com'; // Where can users report bugs.
var lastTranslator = 'Caseproof LLC <support@memberpress.com>'; // Last translator Email ID.
var team = 'Caseproof LLC <support@memberpress.com>'; // Team's Email ID.
// Files to watch
var stylesWatchFiles = './css/*.css'; // Path to all Sass partials.
var scriptsWatchFiles = './js/*.js'; // Path to all custom JS files.
var projectPHPWatchFiles = './**/*.php'; // Path to all PHP files.
/**
* Load Plugins.
*/
var gulp = require('gulp'); // Gulp of-course
// CSS related plugins.
var minifycss = require('gulp-uglifycss'); // Minifies CSS files.
var autoprefixer = require('gulp-autoprefixer'); // Autoprefixing magic.
// JS related plugins.
var uglify = require('gulp-uglify'); // Minifies JS files
// Utility related plugins.
var replace = require('gulp-replace'); // Search and replace text
var rename = require('gulp-rename'); // Renames files E.g. style.css -> style.min.css
var lineec = require('gulp-line-ending-corrector'); // Consistent Line Endings for non UNIX systems. Gulp Plugin for Line Ending Corrector (A utility that makes sure your files have consistent line endings)
var notify = require('gulp-notify'); // Sends message notification to you
var wpPot = require('gulp-wp-pot'); // For generating the .pot file.
var sort = require('gulp-sort'); // Recommended to prevent unnecessary changes in pot-file.
// Browsers you care about for autoprefixing.
// Browserlist https ://github.com/ai/browserslist
const AUTOPREFIXER_BROWSERS = [
'last 2 version'
];
/**
* Task: `styles`.
*
* Compiles Sass, Autoprefixes it and Minifies CSS.
*
* This task does the following:
* 1. Gets the source scss file
* 2. Compiles Sass to CSS
* 3. Autoprefixes it and generates style.css
* 4. Renames the CSS file with suffix .min.css
* 5. Minifies the CSS file and generates .min.css
*/
gulp.task('styles', function () {
gulp.src([
styleSRC,
'!css/*.min.css'
])
.pipe(autoprefixer(AUTOPREFIXER_BROWSERS))
.pipe(rename({ suffix: '.min' }))
.pipe(minifycss({
maxLineLen: 0
}))
.pipe(gulp.dest(styleDestination))
.pipe(notify({ message: 'TASK: "styles" Completed! 💯', onLast: true }))
});
/**
* Task: `scripts`.
*
* Concatenate and uglify JS files.
*
* This task does the following:
* 1. Gets the source folder for JS files
* 2. Concatenates all the files
* 3. Renames the concatenated JS file with suffix .min.js
* 4. Uglifes/Minifies the JS file and generates minified JS file
*/
gulp.task('scripts', function () {
gulp.src([
jsSource,
'!js/*.min.js'
])
.pipe(rename({
suffix: '.min'
}))
.pipe(uglify())
.pipe(lineec()) // Consistent Line Endings for non UNIX systems.
.pipe(gulp.dest(jsDestination))
.pipe(notify({ message: 'TASK: "scripts" Completed! 💯', onLast: true }));
});
/**
* WP POT Translation File Generator.
*
* * This task does the following:
* 1. Gets the source of all the PHP files
* 2. Search and replace the placeholder text for the text domain
* 3. Sort files in stream by path or any custom sort comparator
* 4. Applies wpPot with the variable set at the top of this file
* 5. Generate a .pot file of i18n that can be used for l10n to build .mo file
*/
gulp.task('pot', function () {
return gulp.src(projectPHPWatchFiles)
.pipe( replace( /(?<="|')(tdomain)(?="|')/g, text_domain ) )
.pipe(gulp.dest("./"))
.pipe(sort())
.pipe(wpPot({
domain: text_domain,
package: packageName,
bugReport: bugReport,
lastTranslator: lastTranslator,
team: team
}))
.pipe(gulp.dest(translationDestination + '/' + translationFile))
.pipe(notify({ message: 'TASK: "pot" Completed! 💯', onLast: true }))
});
/**
* Watch Tasks.
*
* Watches for file changes and runs specific tasks.
*/
gulp.task('default', ['styles', 'scripts'], function () {
gulp.watch([stylesWatchFiles, './css/*.css'], ['styles']);
gulp.watch(scriptsWatchFiles, ['scripts']);
});