Registry / devops / gulp-manifest

gulp-manifest

JSON →
library0.1.1jsnpmunverified

Gulp plugin to generate HTML5 Cache Manifest (appcache) files. Version 0.1.1 (last release August 2014). It is a gulp port of grunt-manifest, supporting options: cache, network, fallback, exclude, prefix, suffix, timestamp (default: true), and sha256 hash. Note: AppCache is deprecated in favor of Service Workers. No major updates expected.

npm install gulp-manifest
INSTALL
IMPORT
SIG · GULP-MANIFEST
G
gulp-manifest
devopsjavascriptv0.1.1
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.

manifest
import manifest from 'gulp-manifest'
const manifest = require('gulp-manifest')
Default export as a function.
manifest
const manifest = require('gulp-manifest')
CommonJS usage. No named export.

Shows a Gulp task that generates a cache manifest file with hashing, online preference, and network wildcard.

const gulp = require('gulp'); const manifest = require('gulp-manifest'); gulp.task('manifest', function() { return gulp.src(['build/**/*'], { base: './' }) .pipe(manifest({ hash: true, preferOnline: true, network: ['*'], filename: 'app.manifest', exclude: 'app.manifest' })) .pipe(gulp.dest('build')); });
Debug
Known issues
deprecatedHTML5 AppCache is deprecated; use Service Workers instead.
fix
Migrate to Service Workers (e.g., Workbox).
affects: >=0.0.0
gotchatimestamp option invalidates cache on every build even if content unchanged.
fix
Set timestamp: false and use hash: true for content-based caching.
affects: >=0.1.0
breakingVersion 0.1.0 changed the option 'root' to 'prefix' and 'suffix'.
fix
Use prefix and suffix options instead of root.
affects: 0.0.1 - 0.0.9
gotchaEnsure gulp.src base option is set correctly; otherwise paths in manifest may be relative to cwd.
fix
Set base option in gulp.src, e.g., gulp.src(['build/**/*'], { base: './' }).
affects: >=0.0.0
gotchafilename defaults to 'app.manifest'; must be served with text/cache-manifest MIME type.
fix
Configure your server to serve .manifest files as text/cache-manifest.
affects: >=0.0.0
Errors
Common errors & fixes
Error: Cannot find module 'gulp-manifest'
Package not installed or module path incorrect.
fix
Run npm install gulp-manifest --save-dev and ensure require path is correct.
TypeError: manifest is not a function
Using default import incorrectly in CommonJS environment.
fix
Use const manifest = require('gulp-manifest'); (no destructuring).
Error: ENOENT: no such file or directory
gulp.src glob matches no files or base path is wrong.
fix
Check gulp.src pattern and base option; ensure files exist.
Upgrade
Version history
0.1.1latest on npm
Audit
Dependencies
gulprequiredPeer dependency for Gulp plugin ecosystem
through2requiredStream transformation used internally
graceful-fsrequiredFile system operations
Agent activity
6 hits · last 30 days
node
6
Resources
gulp-manifest — npm install gulp-manifest · libregistry