aboutsummaryrefslogtreecommitdiff
path: root/Gruntfile.js
diff options
context:
space:
mode:
authorCH <clint@thestaticvoid.net>2016-10-05 11:45:37 +0200
committerHakim El Hattab <hakim.elhattab@gmail.com>2016-10-05 11:45:37 +0200
commit2cf00254a1a696111b0f4a48dda1cac399447193 (patch)
tree4d7b6c6d78cc0180879e5978e00fc021056b4b6b /Gruntfile.js
parent693a370f069fe8d8a4c0ea53c47085cd96cf37fc (diff)
downloadfreenode-live-2017-presentation-2cf00254a1a696111b0f4a48dda1cac399447193.tar
freenode-live-2017-presentation-2cf00254a1a696111b0f4a48dda1cac399447193.tar.gz
renamed grunt 'base' option to 'root' (#1660)
* Allow slides to be served away from revealjs server location The previous 'base' option conflicts with Grunt's 'base' option. Changing it to 'root' avoids this. Further, updating to a newer Grunt allows multiple parameters to be used. therefore `grunt serve --root="." --root="pathtomyslides"` allows you to keep your slide content separate from JS/CSS and such * Live reload for relocated base * Updated packages to match origin/dev * Updated packages to match origin/dev * Ensure root is an array
Diffstat (limited to 'Gruntfile.js')
-rw-r--r--Gruntfile.js14
1 files changed, 9 insertions, 5 deletions
diff --git a/Gruntfile.js b/Gruntfile.js
index 7cea2a5..96a4f52 100644
--- a/Gruntfile.js
+++ b/Gruntfile.js
@@ -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