-
Notifications
You must be signed in to change notification settings - Fork 46
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
manifest contains folder names #26
Comments
I went into the same problem and had to add extension to filter
This is not convenient way when caching images though ^^ |
The only solution I got was to exclude the folders names manually like this:
Would like to know a solution which works automatically. |
Having the same problem here. I've forked the repo and made some changes so that the manifest task uses Grunt internal file mapping to build the cache file list. There is no need to include custom options, like basePath or exclude, since this is already handled by Grunt. Now you can use cwd and filter options to build the src list, as described here. Note that you shouldn't use expand == true for this to work (contrary to what the docs say), since that will try to generate a manifest file for each src file found. For example: cwd: 'path/to/src/files',
src: ['**/*.html', '**/*.js'],
filter: 'isFile' Will output only .html and .js files in path/to/src/files directory, and the file path won't include path/to/src/files. @gunta, if you like this approach, I would be happy to send you a pull request. |
I'm also having the exact same problem causing me to manually edit the manifest file whenever I build my application. Excluding the folders manually works fine, but requires me to edit the Gruntfile each time I add a folder. |
I'm in phase with honi. I tried that too but obviously, the plugin is not compatible with grunt files mechanism. That's too bad as this is really the core of grunt. Would be glad to be able to filter folders without having to explicitly write them. |
@jan4dev if you want you can check my fork which uses grunt's internal file mapping. |
@heni, yes, it would be welcomed |
All of my filenames have an extension and none of my folders have a period in them so this worked for me:
|
I already did some time ago: #30 |
See #48. |
I have updated a project from grunt 0.3.x to 0.4.1 and grunt-contrib-manifest from 0.2 to the current version 0.4.0.
Now my appcache manifest contains not only files but directory names too which the browser can't download of course.
The configuration is basically the same as it was before and looks like this:
I have tried different src-Strings but I can't get it to work that automatically ALL of the files (and only files) are included. I could manually exclude the folders but I don't want to change the buildfile every time something changes in folder structure.
Any hints?
Thanks!
Marco
The text was updated successfully, but these errors were encountered: