0.0.15 • Published 10 years ago
gulp-manifest2 v0.0.15
gulp-manifest2
Generate manifest file for web applications to allow them work offline.
Installation
Install package with NPM and add it to your development dependencies:
npm install --save-dev gulp-manifest2
Usage
var manifest = require('gulp-manifest2');
gulp.task('manifest', function() {
return gulp.src('build/*')
.pipe(manifest({
timestamp: true
}))
.pipe(gulp.dest('build'));
});Options
root. TypeString. Optional.Root directory for which it calculates relative paths. Default value is returned by `process.cwd()`.cwd. TypeString. Optional.Current working directory. Default value is returned by `process.cwd()`.name. TypeString. Optional.Name of output manifest file. Default name is `app.manifest`.timestamp. TypeBoolean. Optional.Set to `true` to enable insertion a comment with manifest creation date. This will take browsers to invalidate their cache.cache. TypeArray. Optional.List of files and urls which should be cached too.network. TypeArray. Optional.List of files and urls which should be not be cached, but loads as usual. Default value is array of `http://*`, `https://*`, `*`.fallback. TypeArray. Optional.List of fallback files. Each item in list is space-separated online/offline resource paths.