gunta / grunt-manifest

Generates HTML5 Cache Manifest files

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

support add prefix to files

gasolin opened this issue · comments

Thanks for grunt-manifest, its super convenient :)

In case I did not put .appcache file in the root folder, for example:

I have a grunt config looks like

manifest: {
      generate: {
        options: {
          basePath: "../",
          preferOnline: false,
          verbose: true,
          timestamp: true
        },
        src: [
            "public/osx/*.html"
        ],
        dest: "public/osx/manifest.appcache"
      }
    } 

The generated appcache file looks like

CACHE MANIFEST
# This manifest was generated by grunt-manifest HTML5 Cache Manifest Generator
# Time: Thu Mar 14 2013 21:52:50 GMT+0800 (CST)

CACHE:
public/osx/index.html

the offline cache will try to fetch wrong public/osx/public/osx/index.html instead of correct /public/osx/index.html.

but what I really want is to have CACHE files with / as prefix.

/public/osx/index.html

instead of

public/osx/index.html

to prevent some miss reference issue.

send pull request #22

I don't see this cachePrefix in the https://github.com/gunta/grunt-manifest/blob/master/tasks/manifest.js file. I would also like to use this cachePrefix option.

Also can you make a push to https://npmjs.org/package/grunt-manifest so I can use options.revision.

Close this issue in favor to option.process #31
better for prefix and suffix and modification

Closing for #31