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

gulp-local-cache

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-local-cache

A gulp plugin that provides a persisted file cache

  • 2.0.1
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
0
decreased by-100%
Maintainers
1
Weekly downloads
 
Created
Source

gulp-local-cache

StandardJS travis-ci build status appveyor build status Coverage status

A gulp plugin that provides a persisted file cache

Install

yarn add -D gulp-local-cache

# npm works too
npm i -D gulp-local-cache

Use

const cache = require('gulp-local-cache')
const gulp = require('gulp')

gulp.task('lint', () => {
  return gulp.src('src/*.js')
    .pipe(cache.filter())
// ...

cache.clear([key])

Clear the cache. A key can be provided to specifically clear that cache

// clear entire cache
cache.clear()
// only clear `assets` cache
cache.clear('assets')

cache.filter([key])

Filter out cached files that haven't changed. An optional cache key can be provided if you need to, for example, cache files at multiple stages of the build

gulp.task('assets', () => {
  return gulp.src('*.js')
    .pipe(cache.filter('assets'))
// ...

cache.path([filepath])

Get or set the location of the cache file. Default path is .gulpcache

// get current
cache.path()
// set new
cache.path('.cache/my-cache')

License

MIT

Keywords

FAQs

Package last updated on 10 Dec 2018

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