gulp-wp-rev

Revisioning JS and CSS to scripts.php file on wordpress assets

npm install gulp-wp-rev
5 downloads in the last week
8 downloads in the last month

gulp-wp-rev

NPM version

gulp-wp-rev plugin for gulp

Revisioning JS and CSS to scripts.php file on wordpress assets

Alternative gulpjs version for grunt-wp-version of https://github.com/roots/roots

Usage

First, install gulp-wp-rev as a development dependency:

npm install --save-dev gulp-wp-rev

Then, add it to your gulpfile.js:

var rev = require("gulp-wp-rev");

gulp.task('rev', function () {
    gulp.src('lib/scripts.php')
        .pipe(rev({
            css: "assets/css/main.min.css",
            cssHandle: "roots_main",
            js: "assets/js/scripts.min.js",
            jsHandle: "roots_scripts"
        }))
        .pipe(gulp.dest('lib'));
});

API

wp-rev(options)

options.css

Type: String

css source file

options.js

Type: String

js source file

options.cssHandle

Type: String

Name used as a handle for the stylesheet.

options.jsHandle

Type: String

Name used as a handle for the javascript.

License

MIT License

npm loves you