Browse Source

add base option for grunt serve task #1102

Hakim El Hattab 9 years ago
parent
commit
f0cf1f54d0
1 changed files with 3 additions and 1 deletions
  1. 3 1
      Gruntfile.js

+ 3 - 1
Gruntfile.js

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