Browse Source

Updated the documentation

master
Cédric Belin 6 months ago
parent
commit
eec9a6c6e5
1 changed files with 13 additions and 0 deletions
  1. +13
    -0
      example/gulpfile.cjs

+ 13
- 0
example/gulpfile.cjs View File

@@ -0,0 +1,13 @@
'use strict';
import {phpMinify, TransformMode} from '@cedx/gulp-php-minify';
const {dest, series, src, task} = require('gulp');

/** Compresses a given set of PHP scripts. */
task('compress:php', () => src('path/to/**/*.php', {read: false})
.pipe(phpMinify({
binary: process.platform == 'win32' ? String.raw`C:\Program Files\PHP\php.exe` : '/usr/bin/php',
mode: process.platform == 'win32' ? TransformMode.safe : TransformMode.fast,
silent: process.stdout.isTTY
}))
.pipe(dest('path/to/out'))
);

Loading…
Cancel
Save