npm

Check out our latest tech talk, "JavaScript Supply Chain Security" presented by VP of Security, Adam Baldwin.Watch it here »

browserify-cache-api

3.0.1 • Public • Published

browserify-cache-api

Attaches per-module caching of module resolution and transformation to a browserify instance.

Caches to a file on disk, invalidated by source file modification time.

Used by browserify-incremental

  // create a browserify instance
  var b = browserify({
    // cache and packageCache opts are required
    cache: {},
    packageCache: {},
    // and then your opts...
  });
 
  // attach caching, specifying a location to store the cache file
  browserifyCache(b, {cacheFile: './tmp/browserify-cache.json'});
 
  // browserify module resolution + transformation is now cached

Contributing

Please see the Contributor Guidelines.

Keywords

none

install

npm i browserify-cache-api

Downloadsweekly downloads

36,848

version

3.0.1

license

MIT

homepage

github.com

repository

Gitgithub

last publish

collaborators

  • avatar
  • avatar
Report a vulnerability