From cf9aeb5ce54cafd15268012c520d4aad248b42ba Mon Sep 17 00:00:00 2001 From: dangreen Date: Wed, 23 Jan 2019 11:55:24 +0700 Subject: [PATCH] #75 fix --- CHANGELOG.md | 4 ++++ package.json | 2 +- src/index.js | 4 ++-- 3 files changed, 7 insertions(+), 3 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 98e9f11..9d98c19 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,6 +5,10 @@ All notable changes to this project will be documented in this file. The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/) and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.html). +## [1.1.1] - 2019-01-23 +### Fixed +- [#75](https://github.com/jgable/gulp-cache/issues/75) + ## [1.1.0] - 2019-01-07 ### Changed - Dependencies were updated. diff --git a/package.json b/package.json index 293d5fe..445c381 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "gulp-cache", - "version": "1.1.0", + "version": "1.1.1", "description": "A cache proxy plugin for Gulp", "author": "Jacob Gable (http://jacobgable.com)", "contributors": [ diff --git a/src/index.js b/src/index.js index 680b9ac..0e417fc 100644 --- a/src/index.js +++ b/src/index.js @@ -66,7 +66,7 @@ plugin.Cache = Cache; plugin.fileCache = fileCache; plugin.defaultOptions = defaultOptions; -export default function plugin(task, inputOptions) { +export default function plugin(task, inputOptions = {}) { // Check for required task option if (!task) { throw new PluginError('gulp-cache', 'Must pass a task to cache()'); @@ -74,7 +74,7 @@ export default function plugin(task, inputOptions) { const options = { ...plugin.defaultOptions, - ...task.cacheable, + ...(task.cacheable || {}), ...inputOptions }; const taskProxy = new TaskProxy(task, options);