Browse Source

Added manifest for iOS

Tobias Reich 10 years ago
parent
commit
b27d8cfbd7
4 changed files with 30 additions and 3 deletions
  1. 8 0
      assets/min/cache.manifest
  2. 18 0
      build/Gruntfile.coffee
  3. 3 2
      build/package.json
  4. 1 1
      index.html

+ 8 - 0
assets/min/cache.manifest

@@ -0,0 +1,8 @@
+CACHE MANIFEST
+
+# 1396383979640
+
+assets/min/main.css
+assets/min/main.js
+assets/img/no_images.svg
+assets/img/password.svg

+ 18 - 0
build/Gruntfile.coffee

@@ -42,6 +42,23 @@ module.exports = (grunt) ->
 				files:
 					'../assets/min/main.css': '../assets/min/main.css'
 
+		'file-creator':
+
+			manifest:
+				"../assets/min/cache.manifest": (fs, fd, done) ->
+					text =	"""
+							CACHE MANIFEST
+
+							# #{ (new Date()).valueOf().toString() }
+
+							assets/min/main.css
+							assets/min/main.js
+							assets/img/no_images.svg
+							assets/img/password.svg
+							"""
+					fs.writeSync fd, text
+					done()
+
 		watch:
 
 			js:
@@ -68,6 +85,7 @@ module.exports = (grunt) ->
 		grunt.task.run [
 			'js'
 			'css'
+			'file-creator'
 		]
 
 	grunt.registerTask 'js', [

+ 3 - 2
build/package.json

@@ -16,6 +16,7 @@
     "grunt-contrib-cssmin": "~0.9.0",
     "grunt-contrib-clean": "~0.5.0",
     "grunt-contrib-watch": "~0.6.0",
-    "load-grunt-tasks": "~0.4.0"
+    "load-grunt-tasks": "~0.4.0",
+    "grunt-file-creator": "~0.1.1"
   }
-}
+}

+ 1 - 1
index.html

@@ -1,5 +1,5 @@
 <!DOCTYPE HTML>
-<html>
+<html manifest="assets/min/cache.manifest">
 	<head>
 
 		<meta http-equiv="Content-Type" content="text/html;charset=utf-8">