Created
July 18, 2013 21:51
-
-
Save fnakstad/6033441 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| module.exports = function(grunt) { | |
| // Load plugins | |
| grunt.loadNpmTasks('grunt-manifest'); | |
| grunt.loadNpmTasks('grunt-contrib-watch'); | |
| // Make a list of paths/files to cache | |
| var cache = ['./public/js/*', './public/img/*', './public/css/*']; | |
| grunt.initConfig({ | |
| // Define how your manifest file should be constructed | |
| manifest: { | |
| generate: { | |
| options: { | |
| network: ['http://*', 'https://*'], | |
| timestamp: true | |
| }, | |
| src: cache, | |
| dest: 'manifest.appcache' | |
| } | |
| }, | |
| // Now setup the watch task to monitor the same files | |
| // that are referenced in the CACHE section of your | |
| // manifest, and fire the "manifest" task whenever | |
| // a change is detected | |
| watch: { | |
| scripts: { | |
| files: cache, | |
| tasks: ['manifest'] | |
| } | |
| } | |
| }); | |
| }; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment