Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

gulp-rev-replace-stream

Package Overview
Dependencies
Maintainers
1
Versions
4
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

gulp-rev-replace-stream

A plugin for Gulp

  • 0.0.1-alpha4
  • latest
  • Source
  • npm
  • Socket score

Version published
Maintainers
1
Created
Source

gulp-rev-replace-stream

[![NPM version][https://badge.fury.io/js/gulp-rev-replace-stream.png][https://npmjs.org/package/gulp-rev-replace-stream]

rev-replace-stream plugin for gulp

Usage

First, install gulp-rev-replace-stream as a development dependency:

npm install --save-dev gulp-rev-replace-stream

Then, add it to your gulpfile.js:

$ = require('gulp-load-plugins')()

// optimize
gulp.task 'optimize', function() {

  jsFilter     = $.filter('src/**/*.js');
  cssFilter    = $.filter('src/**/*.css');
  userefFilter = $.useref.assets();

  gulp.src('src/index.html', {base: 'src'})
    .pipe(userefFilter)
    .pipe(jsFilter)
    .pipe($.uglify())
    .pipe(jsFilter.restore())
    .pipe(cssFilter)
    .pipe($.minifyCss())
    .pipe(cssFilter.restore())
    .pipe(userefFilter.restore())
    .pipe($.useref())
    .pipe($.buffer())
    .pipe($.if(/^((?!(index\.html)).)*$/, $.rev()))
    .pipe($.revReplaceStream())
    .pipe(gulp.dest('dist'))
    .pipe($.size())
}

API

revReplaceStream()

TODO: add instrutions.

License

MIT License

Keywords

FAQs

Package last updated on 10 Nov 2014

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc