浏览代码

Add option to Gruntfile.js to specify server port

Marek Šuppa 11 年之前
父节点
当前提交
b8efad0b27
共有 1 个文件被更改,包括 2 次插入2 次删除
  1. 2 2
      Gruntfile.js

+ 2 - 2
Gruntfile.js

@@ -1,6 +1,6 @@
 /* global module:false */
 module.exports = function(grunt) {
-
+	var port = grunt.option('port') || 8000;
 	// Project configuration
 	grunt.initConfig({
 		pkg: grunt.file.readJSON('package.json'),
@@ -78,7 +78,7 @@ module.exports = function(grunt) {
 		connect: {
 			server: {
 				options: {
-					port: 8000,
+					port: port,
 					base: '.'
 				}
 			}