add base option for grunt serve task #1102

edit
Hakim El Hattab 2015-06-03 11:42:17 +02:00
parent 434cd3b8ae
commit f0cf1f54d0
1 changed files with 3 additions and 1 deletions

View File

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