浏览代码

grunt serve starts the browser and livereloads changes in the presentation
- upgrade grunt-contrib-connect to ~0.5.0
- configure connect and watch plugin

Daniel Wegener 11 年之前
父节点
当前提交
5c1497e8b2
共有 2 个文件被更改,包括 11 次插入3 次删除
  1. 10 2
      Gruntfile.js
  2. 1 1
      package.json

+ 10 - 2
Gruntfile.js

@@ -80,7 +80,9 @@ module.exports = function(grunt) {
 			server: {
 				options: {
 					port: port,
-					base: '.'
+					base: '.',
+                    livereload: true,
+                    open: true
 				}
 			}
 		},
@@ -97,6 +99,9 @@ module.exports = function(grunt) {
 		},
 
 		watch: {
+            options: {
+                livereload: true
+            },
 			main: {
 				files: [ 'Gruntfile.js', 'js/reveal.js', 'css/reveal.css' ],
 				tasks: 'default'
@@ -104,7 +109,10 @@ module.exports = function(grunt) {
 			theme: {
 				files: [ 'css/theme/source/*.scss', 'css/theme/template/*.scss' ],
 				tasks: 'themes'
-			}
+			},
+            html: {
+                files: [ 'index.html']
+            }
 		}
 
 	});

+ 1 - 1
package.json

@@ -33,7 +33,7 @@
     "grunt-contrib-uglify": "~0.2.4",
     "grunt-contrib-watch": "~0.5.3",
     "grunt-contrib-sass": "~0.5.0",
-    "grunt-contrib-connect": "~0.4.1",
+    "grunt-contrib-connect": "~0.5.0",
     "grunt-zip": "~0.7.0",
     "grunt": "~0.4.0"
   },