Skip to content

Commit

Permalink
Updated appsettings.json
Browse files Browse the repository at this point in the history
  • Loading branch information
madskristensen committed Nov 15, 2017
1 parent eab3663 commit 7f15195
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 23 deletions.
35 changes: 15 additions & 20 deletions src/schemas/json/appsettings.json
Expand Up @@ -38,39 +38,39 @@
}
}
},
"serviceworker": {
"pwa": {
"properties": {
"cacheId": {
"description": "The cache identifier of the service worker (can be any string). Change this property to force the service worker to reload in browsers.",
"type": "string"
"type": "string",
"default": "v1.0"
},
"offlineRoute": {
"description": "The route to the page to show when offline.",
"type": "string"
"type": "string",
"default": "/offline.html"
},
"registerServiceWorker": {
"description": "Determines if a script that registers the service worker should be injected into the bottom of the HTML page.",
"type": "boolean"
"type": "boolean",
"default": true
},
"registerWebmanifest": {
"description": "Determines if a meta tag that points to the web manifest should be inserted at the end of the head element.",
"type": "boolean",
"default": true
},
"routesToPreCache": {
"description": "A comma separated list of routes to pre-cache when service worker installs in the browser.",
"type": "string"
"type": "string",
"default": ""
},
"strategy": {
"description": "Selects one of the predefined service worker types.",
"enum": [ "cacheFirst", "cacheFirstSafe", "minimal", "networkFirst" ],
"default": "cacheFirstSafe"
}
}
},

"webmanifest": {
"properties": {
"registerWebmanifest": {
"description": "Determines if a meta tag that points to the web manifest should be inserted at the end of the head element.",
"type": "boolean"
}
}
}
},

Expand All @@ -79,11 +79,6 @@
"^webOptimizer$": { "$ref": "#/definitions/webOptimizer" },
"^weboptimizer$": { "$ref": "#/definitions/webOptimizer" },
"^(cdn|Cdn)$": { "$ref": "#/definitions/cdn" },
"webmanifest": {
"allOf": [
{ "$ref": "#/definitions/webmanifest" },
{ "$ref": "http://json.schemastore.org/web-manifest" }
]
}
"^(pwa|PWA|Pwa)$": { "$ref": "#/definitions/pwa" }
}
}
6 changes: 3 additions & 3 deletions src/test/appsettings/weboptimizer.json
Expand Up @@ -7,8 +7,8 @@
"cdn": {
"url": "//foo.com"
},
"webmanifest": {
"short_name": "foo",
"categories": [ "ds" ]
"pwa": {
"registerWebmanifest": true,
"strategy": "cacheFirstSafe"
}
}

0 comments on commit 7f15195

Please sign in to comment.