gunta / grunt-manifest

Generates HTML5 Cache Manifest files

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

CACHE section empty if not specifying cache option

alejandroiglesias opened this issue · comments

Here is my manifest task config:

manifest: {
  generate: {
    options: {
      basePath: "public/"
    },
    src: [
      "public/css/main.css",
      "public/css/fonts/**/*",
      "public/js/main.min.js",
      "public/js/vendor/zepto.min.js",
      "public/js/vendor/jquery.min.js",
      "public/img/**/*"
    ],
    dest: 'public/manifest.appcache'
  }
},

The expected output would be all the files specified in the src parameter (all the fonts inside public/css/fonts/ and all the images in public/img/ directories also). What I get is an empty CACHE section.
When I copied the src array to options.cache it outputted them in the CACHE section like this:

CACHE:
public/css/main.css
public/css/fonts/**/*
public/js/main.min.js
public/js/vendor/zepto.min.js
public/js/vendor/jquery.min.js
public/img/**/*

Clearly not parsing the directories and placing correct files.
Any clue about this?
Thanks.

Hi, I had the same problem and I managed to find out what was going wrong. Since you are already specifying basepath 'public/', you don't need to repeat it in src. So with 'css/main.css', etc. will work.

Reproduced. I have also experienced the same, defining a single item in the �cache option array resolved it. Should clearly be fixed.