New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

connect-cache-manifest

Package Overview
Dependencies
Maintainers
1
Versions
5
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

connect-cache-manifest

Express/connect middleware to generate HTML5 cache manifest file

  • 0.2.2
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
5
decreased by-58.33%
Maintainers
1
Weekly downloads
 
Created
Source

connect-cache-manifest

Express/connect middleware to generate HTML5 cache manifest file. This module is highly inspired by https://github.com/dustMason/connect-offline/.

The original reason I forked as a new project: https://github.com/dustMason/connect-offline/issues/1

How to use

% npm install connect-cache-manifest

In app.js:

var express = require('express');
var cacheManifest = require('connect-cache-manifest');
var app = express();
app.use(cacheManifest({
  manifestPath: '/application.manifest',
  cdn: ['http://yui.yahooapis.com/pure/0.5.0/pure-min.css'],
  files: [{
    file: __dirname + '/public/js/foo.js',
    path: '/js/foo.js'
  }, {
    dir: __dirname + '/public/css',
    prefix: '/css/'
  }, {
    dir: __dirname + '/views',
    prefix: '/html/',
    ignore: function(x) { return /\.bak$/.test(x); },
    replace: function(x) { return x.replace(/\.jade$/, '.html'); }
  }],
  networks: ['*'],
  fallbacks: []
}));

Options

  • manifestPath: path name for the manifest file.
  • cdn: list of cdn's you wish you cache in your manifest file
  • files: list of items to cache entries; an item is either { dir: '<dir path>', prefix: '<url prefix>'} or { file: '<file path>', path: '<url path>'}
  • networks: list of strings for network entries.
  • fallbacks: list of strings for fallback entries.

Keywords

FAQs

Package last updated on 29 Jun 2015

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