File tree Expand file tree Collapse file tree 2 files changed +13
-25
lines changed
Expand file tree Collapse file tree 2 files changed +13
-25
lines changed Original file line number Diff line number Diff line change 11// Generated on <%= (new Date).toISOString().split('T')[0] %> using <%= pkg.name %> <%= pkg.version %>
22'use strict' ;
33var LIVERELOAD_PORT = 35729 ;
4- var lrSnippet = require ( 'connect-livereload' ) ( { port : LIVERELOAD_PORT } ) ;
5- var mountFolder = function ( connect , dir ) {
6- return connect . static ( require ( 'path' ) . resolve ( dir ) ) ;
7- } ;
84
95// # Globbing
106// for performance reasons we're only matching one level down:
@@ -76,38 +72,31 @@ module.exports = function (grunt) {
7672 } ,
7773 livereload : {
7874 options : {
79- middleware : function ( connect ) {
80- return [
81- lrSnippet ,
82- mountFolder ( connect , '.tmp' ) ,
83- mountFolder ( connect , yeomanConfig . app )
84- ] ;
85- }
75+ livereload : LIVERELOAD_PORT ,
76+ base : [
77+ '.tmp' ,
78+ yeomanConfig . app
79+ ]
8680 }
8781 } ,
8882 test : {
8983 options : {
90- middleware : function ( connect ) {
91- return [
92- mountFolder ( connect , '.tmp' ) ,
93- mountFolder ( connect , 'test' )
94- ] ;
95- }
84+ middleware : [
85+ '.tmp' ,
86+ 'test' ,
87+ yeomanConfig . app
88+ ]
9689 }
9790 } ,
9891 dist : {
9992 options : {
100- middleware : function ( connect ) {
101- return [
102- mountFolder ( connect , yeomanConfig . dist )
103- ] ;
104- }
93+ base : yeomanConfig . dist
10594 }
10695 }
10796 } ,
10897 open : {
10998 server : {
110- url : 'http://localhost:<%%= connect.options.port %>'
99+ url : 'http://localhost:<%%= connect.options.port %>/index.html '
111100 }
112101 } ,
113102 clean : {
Original file line number Diff line number Diff line change 1111 "grunt-contrib-compass" : " ~0.5.0" ,
1212 "grunt-contrib-jshint" : " ~0.6.0" ,
1313 "grunt-contrib-cssmin" : " ~0.6.0" ,
14- "grunt-contrib-connect" : " ~0.3 .0" ,
14+ "grunt-contrib-connect" : " ~0.4 .0" ,
1515 "grunt-contrib-clean" : " ~0.5.0" ,
1616 "grunt-contrib-htmlmin" : " ~0.1.3" ,
1717 "grunt-contrib-imagemin" : " ~0.2.0" ,
2323 "grunt-open" : " ~0.2.0" ,
2424 "grunt-concurrent" : " ~0.3.0" ,
2525 "load-grunt-tasks" : " ~0.1.0" ,
26- "connect-livereload" : " ~0.2.0" ,
2726 "grunt-google-cdn" : " ~0.2.0" ,
2827 "grunt-ngmin" : " ~0.0.2" ,
2928 "time-grunt" : " ~0.1.0"
You can’t perform that action at this time.
0 commit comments