summaryrefslogtreecommitdiffhomepage
path: root/Gruntfile.js
diff options
context:
space:
mode:
Diffstat (limited to 'Gruntfile.js')
-rw-r--r--Gruntfile.js38
1 files changed, 27 insertions, 11 deletions
diff --git a/Gruntfile.js b/Gruntfile.js
index f6c71e2..aa04b68 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({
@@ -13,7 +15,7 @@ module.exports = function(grunt) {
' * http://lab.hakim.se/reveal-js\n' +
' * MIT licensed\n' +
' *\n' +
- ' * Copyright (C) 2015 Hakim El Hattab, http://hakim.se\n' +
+ ' * Copyright (C) 2017 Hakim El Hattab, http://hakim.se\n' +
' */'
},
@@ -42,7 +44,7 @@ module.exports = function(grunt) {
{
expand: true,
cwd: 'css/theme/source',
- src: ['*.scss'],
+ src: ['*.sass', '*.scss'],
dest: 'css/theme',
ext: '.css'
}
@@ -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: {
@@ -113,15 +117,17 @@ module.exports = function(grunt) {
},
watch: {
- options: {
- livereload: true
- },
js: {
files: [ 'Gruntfile.js', 'js/reveal.js' ],
tasks: 'js'
},
theme: {
- files: [ 'css/theme/source/*.scss', 'css/theme/template/*.scss' ],
+ files: [
+ 'css/theme/source/*.sass',
+ 'css/theme/source/*.scss',
+ 'css/theme/template/*.sass',
+ 'css/theme/template/*.scss'
+ ],
tasks: 'css-themes'
},
css: {
@@ -129,11 +135,20 @@ module.exports = function(grunt) {
tasks: 'css-core'
},
html: {
- files: [ 'index.html']
+ files: root.map(path => path + '/*.html')
},
markdown: {
- files: [ './*.md' ]
+ files: root.map(path => path + '/*.md')
+ },
+ options: {
+ livereload: true
}
+ },
+
+ retire: {
+ js: ['js/reveal.js', 'lib/js/*.js', 'plugin/**/*.js'],
+ node: ['.'],
+ options: {}
}
});
@@ -148,6 +163,7 @@ module.exports = function(grunt) {
grunt.loadNpmTasks( 'grunt-contrib-connect' );
grunt.loadNpmTasks( 'grunt-autoprefixer' );
grunt.loadNpmTasks( 'grunt-zip' );
+ grunt.loadNpmTasks( 'grunt-retire' );
// Default task
grunt.registerTask( 'default', [ 'css', 'js' ] );