From 7621e1085d6389b214f244ac3e3ddb78c381d1c8 Mon Sep 17 00:00:00 2001 From: Bjoern Kimminich Date: Fri, 8 Jan 2016 10:46:28 +0100 Subject: added retire.js to build process -allows security vulnerability check in used npm-dependencies and own scripts -execute with ```grunt retire``` --- Gruntfile.js | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) (limited to 'Gruntfile.js') diff --git a/Gruntfile.js b/Gruntfile.js index f6c71e2..11bd42b 100644 --- a/Gruntfile.js +++ b/Gruntfile.js @@ -134,7 +134,14 @@ module.exports = function(grunt) { markdown: { files: [ './*.md' ] } - } + }, + + retire: { + js: ['js/reveal.js', 'lib/js/*.js', 'plugin/**/*.js'], + node: ['.'], + options: { + } + } }); @@ -148,6 +155,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' ] ); -- cgit v1.2.3 From 2cf00254a1a696111b0f4a48dda1cac399447193 Mon Sep 17 00:00:00 2001 From: CH Date: Wed, 5 Oct 2016 11:45:37 +0200 Subject: 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 --- Gruntfile.js | 14 +++++++++----- package.json | 2 +- 2 files changed, 10 insertions(+), 6 deletions(-) (limited to 'Gruntfile.js') 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 diff --git a/package.json b/package.json index 7f6f334..c96e4fd 100644 --- a/package.json +++ b/package.json @@ -28,7 +28,7 @@ "socket.io": "^1.4.8" }, "devDependencies": { - "grunt": "~0.4.5", + "grunt": "~1.0.1", "grunt-autoprefixer": "~3.0.3", "grunt-contrib-connect": "~0.11.2", "grunt-contrib-cssmin": "~0.14.0", -- cgit v1.2.3