Skip to content

Commit

Permalink
fix(build): update to grunt-contrib-connect 0.4.0
Browse files Browse the repository at this point in the history
  • Loading branch information
passy committed Sep 9, 2013
1 parent 0568e74 commit 368ad7f
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 25 deletions.
35 changes: 12 additions & 23 deletions templates/common/Gruntfile.js
Original file line number Diff line number Diff line change
@@ -1,10 +1,6 @@
// Generated on <%= (new Date).toISOString().split('T')[0] %> using <%= pkg.name %> <%= pkg.version %>
'use strict';
var LIVERELOAD_PORT = 35729;
var lrSnippet = require('connect-livereload')({ port: LIVERELOAD_PORT });
var mountFolder = function (connect, dir) {
return connect.static(require('path').resolve(dir));
};

// # Globbing
// for performance reasons we're only matching one level down:
Expand Down Expand Up @@ -76,38 +72,31 @@ module.exports = function (grunt) {
},
livereload: {
options: {
middleware: function (connect) {
return [
lrSnippet,
mountFolder(connect, '.tmp'),
mountFolder(connect, yeomanConfig.app)
];
}
livereload: LIVERELOAD_PORT,
base: [
'.tmp',
yeomanConfig.app
]
}
},
test: {
options: {
middleware: function (connect) {
return [
mountFolder(connect, '.tmp'),
mountFolder(connect, 'test')
];
}
middleware: [
'.tmp',
'test',
yeomanConfig.app
]
}
},
dist: {
options: {
middleware: function (connect) {
return [
mountFolder(connect, yeomanConfig.dist)
];
}
base: yeomanConfig.dist
}
}
},
open: {
server: {
url: 'http://localhost:<%%= connect.options.port %>'
url: 'http://localhost:<%%= connect.options.port %>/index.html'
}
},
clean: {
Expand Down
3 changes: 1 addition & 2 deletions templates/common/_package.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
"grunt-contrib-compass": "~0.5.0",
"grunt-contrib-jshint": "~0.6.0",
"grunt-contrib-cssmin": "~0.6.0",
"grunt-contrib-connect": "~0.3.0",
"grunt-contrib-connect": "~0.4.0",
"grunt-contrib-clean": "~0.5.0",
"grunt-contrib-htmlmin": "~0.1.3",
"grunt-contrib-imagemin": "~0.2.0",
Expand All @@ -23,7 +23,6 @@
"grunt-open": "~0.2.0",
"grunt-concurrent": "~0.3.0",
"load-grunt-tasks": "~0.1.0",
"connect-livereload": "~0.2.0",
"grunt-google-cdn": "~0.2.0",
"grunt-ngmin": "~0.0.2",
"time-grunt": "~0.1.0"
Expand Down

0 comments on commit 368ad7f

Please sign in to comment.