         new_name: grunt.option("theme") or "<%= amsf.theme.current %>"
         new_url: grunt.option("url") or "<%= amsf.theme.current_url %>"
 
-    swPrecache:
-      dev:
+    sw_precache:
+      dist:
         handleFetch: true
-        cacheId: "<%= config.pkg.name %>"
         rootDir: "<%= config.dist %>"
-        destDir: "<%= config.dist %><%= config.base %>"
 
     coffeelint:
       options:

"use strict"

path = require("path")
swPrecache = require("sw-precache")

module.exports = (grunt) ->


        push: false

  # Custom tasks
  grunt.registerMultiTask "sw_precache", ->
    done = @async()
    handleFetch = @data.handleFetch
    rootDir = @data.rootDir
    writeServiceWorkerFile rootDir, handleFetch, (error) ->
      if error
        grunt.fail.warn error
      done()
