Registry / devops / gulp-file-transform-cache

gulp-file-transform-cache

JSON →
library2.0.0jsnpmunverified

A gulp plugin that caches intermediate file transformations to speed up build pipelines by skipping repeated expensive steps (e.g., Babel compilation). Version 2.0.0 wraps the file-transform-cache module and integrates as a gulp plugin. It allows specifying a cache file path and an array of transform streams. This plugin is useful for large projects where re-running transforms on unchanged files is wasteful, offering a simple drop-in enhancement to existing gulp pipelines. No recent activity; releases are sporadic.

npm install gulp-file-transform-cache
INSTALL
IMPORT
SIG · GULP-FILE-TRANSFOR
G
gulp-file-transform-cache
devopsjavascriptv2.0.0
harness data pending
Install & Compatibility
Where this runs

No compatibility data collected yet for this library.

Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

default
import gftc from 'gulp-file-transform-cache'
const gftc = require('gulp-file-transform-cache')
ESM default import works; CommonJS require also works but typing may differ.
gftc (as named)
import { gftc } from 'gulp-file-transform-cache'
Named export 'gftc' is available; prefer default import for clarity.
default (require)
const gftc = require('gulp-file-transform-cache').default
const gftc = require('gulp-file-transform-cache')
CommonJS require returns an object with default property; many forget the .default.

Shows how to add transform caching to a gulp pipeline with Babel as an example.

import gulp from 'gulp'; import babel from 'gulp-babel'; import gftc from 'gulp-file-transform-cache'; export function build() { return gulp.src('js/**/*.jsx') .pipe(gftc({ path: '.babelCache', transformStreams: [babel()] })) .pipe(gulp.dest('dest')); }
Debug
Known issues
deprecatedgulp-util is deprecated; plugin uses it internally.
fix
Monitor for updates or switch to alternative cache plugins.
affects: >=1.0.0 <=2.0.0
gotchaCache file path is relative to process.cwd() unless absolute; may cause issues in different working directories.
fix
Provide absolute path using path.resolve() for consistency.
affects: >=1.0.0
gotchaThe plugin expects transformStreams to be an array, but if only one transform, array can be omitted; this can cause confusion.
fix
Always wrap single transform in array for clarity: transformStreams: [babel()]
affects: >=1.0.0
deprecatedPackage has not been updated for modern gulp versions (gulp 4+).
fix
Use gulp 3 compatible pipelines or fork the package.
affects: >=1.0.0
gotchaCache invalidation is based on file content hash; if transform dependencies change (e.g., Babel version), cache is not invalidated automatically.
fix
Delete cache file manually when updating transform libraries.
affects: >=1.0.0
Errors
Common errors & fixes
Error: Cannot find module 'gulp-util'
gulp-util is a peer dependency not installed automatically in npm v3+.
fix
Run `npm install gulp-util --save-dev` or switch to a plugin that doesn't depend on it.
TypeError: transformStreams is not iterable
Passing a single stream object instead of an array when only one transform.
fix
Wrap the stream in an array: transformStreams: [babel()]
Error: ENOENT: no such file or directory, open '.babelCache'
Cache file path is relative but the working directory differs; or cache file path does not exist.
fix
Use absolute path: gftc({ path: path.resolve('.babelCache'), ... })
Upgrade
Version history
2.0.0latest on npm
Audit
Dependencies
file-transform-cacherequiredcore caching logic
through2requiredstream transformation in gulp plugin
gulp-utiloptionalgulp plugin utilities (may be deprecated in favor of PluginError)
Agent activity
8 hits · last 30 days
node
8
Resources
gulp-file-transform-cache — npm install gulp-file-transform-cache · libregistry