const gulp   = require('gulp');
const config = require('../config');

const rev               = require('gulp-rev');
const revDeleteOriginal = require('gulp-rev-delete-original');
const revCssUrls        = require('gulp-rev-css-url');

gulp.task('rev', function()
{
    return gulp.src(config.rev.versionablePaths)
    .pipe(rev())
    .pipe(revCssUrls())
    .pipe(revDeleteOriginal())
    .pipe(gulp.dest(config.rev.destinationPath))
    .pipe(rev.manifest())
    .pipe(gulp.dest(config.rev.destinationPath));
});
