AppCache manifest generator for Node.js.
CoffeeScript
Switch branches/tags
Nothing to show
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
tests
README.md
appcache.coffee
appcache.js
package.json

README.md

AppCache

AppCache manifest generator for Node.js.

Features

Provide different modes for generating cache manifest.

  • development
  • production

You can configure your own mode for your application.

node-appcache automatically bumps your manifest version, so you don't need to bump it manually.

Install

npm install appcache

Synopsis

AppCache = require("appcache")
appcache = new AppCache(".appcache",{ mode: "development" })
appcache.configure "production", () ->
    @cache([
       "/js/coffee-script.js"
       "/js/sha1.js"
       "/js/jquery.md5.js"
       "/js/console.js"
       "/js/jquery.cookie.js"
       "/js/wireroom.coffee"
       "/socket.io/socket.io.js"
    ])
    @cache("/css/wireroom.css")
    @cache("/umobi/compiled/umobi.min.css")
    @cache("/socket.io/socket.io.js")
    @network("*")
    @fallback("... ...")

Then in your routes (routes/index.coffee):

exports.appcache = appcache.route()