|
@@ -1,7 +1,9 @@
|
|
|
/* global module:false */
|
|
|
module.exports = function(grunt) {
|
|
|
var port = grunt.option('port') || 8000;
|
|
|
- var base = grunt.option('base') || '.';
|
|
|
+ var root = grunt.option('root') || '.';
|
|
|
+
|
|
|
+ if (!Array.isArray(root)) root = [root];
|
|
|
|
|
|
// Project configuration
|
|
|
grunt.initConfig({
|
|
@@ -69,6 +71,7 @@ module.exports = function(grunt) {
|
|
|
curly: false,
|
|
|
eqeqeq: true,
|
|
|
immed: true,
|
|
|
+ esnext: true,
|
|
|
latedef: true,
|
|
|
newcap: true,
|
|
|
noarg: true,
|
|
@@ -93,11 +96,12 @@ module.exports = function(grunt) {
|
|
|
server: {
|
|
|
options: {
|
|
|
port: port,
|
|
|
- base: base,
|
|
|
+ base: root,
|
|
|
livereload: true,
|
|
|
open: true
|
|
|
}
|
|
|
- }
|
|
|
+ },
|
|
|
+
|
|
|
},
|
|
|
|
|
|
zip: {
|
|
@@ -126,10 +130,10 @@ module.exports = function(grunt) {
|
|
|
tasks: 'css-core'
|
|
|
},
|
|
|
html: {
|
|
|
- files: [ '*.html']
|
|
|
+ files: root.map(path => path + '/*.html')
|
|
|
},
|
|
|
markdown: {
|
|
|
- files: [ '*.md' ]
|
|
|
+ files: root.map(path => path + '/*.md')
|
|
|
},
|
|
|
options: {
|
|
|
livereload: true
|