gulp-cacheable 1.1.1 • Public • Published 10 years ago gulp-cacheable
A gulp plugin for caching gulp streams using vinyl-sources .
Installation
npm install gulp-cacheable
Usage
var gulp = require ( ' gulp ' ) ;
var plugin1 = require ( ' gulp-plugin1 ' ) ;
var plugin2 = require ( ' gulp-plugin2 ' ) ;
var cacheable = require ( ' gulp-cacheable ' ) ;
gulp . task ( ' javascript ' , function ( ) {
gulp . src ( ' src/**/*.js ' )
. pipe ( cacheable . start ( { cacheProvider : new cacheable . DiskCacheProvider ( ' .buildcache ' ) } ) )
. pipe ( plugin1 ( ) )
. pipe ( plugin2 ( ) )
. pipe ( cacheable . stop ( ) )
. pipe ( gulp . dest ( ' dist ' ) ) ;
} ) ;
Plugins between cacheable.start(..)
and cacheable.stop()
can implement vinyl-sources to supply details about which source files made up the transformed result.
/gulp-cacheable/ / gulp-cacheable /
Package Sidebar Install Downloads Weekly Downloads