From 5ae2d3eb1ef2dc47c82ef831cbd0b15a5ae27c9f Mon Sep 17 00:00:00 2001 From: Hakim El Hattab Date: Thu, 28 Feb 2019 11:22:32 +0100 Subject: update grunt dependencies --- Gruntfile.ts | 189 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 189 insertions(+) create mode 100644 Gruntfile.ts (limited to 'Gruntfile.ts') diff --git a/Gruntfile.ts b/Gruntfile.ts new file mode 100644 index 0000000..f9c9dd6 --- /dev/null +++ b/Gruntfile.ts @@ -0,0 +1,189 @@ +/* global module:false */ +module.exports = function(grunt) { + const sass = require('node-sass'); + + require('load-grunt-tasks')(grunt); + + let port = grunt.option('port') || 8000; + let root = grunt.option('root') || '.'; + + if (!Array.isArray(root)) root = [root]; + + // Project configuration + grunt.initConfig({ + pkg: grunt.file.readJSON('package.json'), + meta: { + banner: + '/*!\n' + + ' * reveal.js <%= pkg.version %> (<%= grunt.template.today("yyyy-mm-dd, HH:MM") %>)\n' + + ' * http://revealjs.com\n' + + ' * MIT licensed\n' + + ' *\n' + + ' * Copyright (C) 2019 Hakim El Hattab, http://hakim.se\n' + + ' */' + }, + + qunit: { + files: [ 'test/*.html' ] + }, + + uglify: { + options: { + banner: '<%= meta.banner %>\n', + ie8: true + }, + build: { + src: 'js/reveal.js', + dest: 'js/reveal.min.js' + } + }, + + sass: { + options: { + implementation: sass, + sourceMap: false + }, + core: { + src: 'css/reveal.scss', + dest: 'css/reveal.css' + }, + themes: { + expand: true, + cwd: 'css/theme/source', + src: ['*.sass', '*.scss'], + dest: 'css/theme', + ext: '.css' + } + }, + + autoprefixer: { + core: { + src: 'css/reveal.css' + } + }, + + cssmin: { + options: { + compatibility: 'ie9' + }, + compress: { + src: 'css/reveal.css', + dest: 'css/reveal.min.css' + } + }, + + jshint: { + options: { + curly: false, + eqeqeq: true, + immed: true, + esnext: true, + latedef: 'nofunc', + newcap: true, + noarg: true, + sub: true, + undef: true, + eqnull: true, + browser: true, + expr: true, + loopfunc: true, + globals: { + head: false, + module: false, + console: false, + unescape: false, + define: false, + exports: false + } + }, + files: [ 'Gruntfile.js', 'js/reveal.js' ] + }, + + connect: { + server: { + options: { + port: port, + base: root, + livereload: true, + open: true, + useAvailablePort: true + } + } + }, + + zip: { + bundle: { + src: [ + 'index.html', + 'css/**', + 'js/**', + 'lib/**', + 'images/**', + 'plugin/**', + '**.md' + ], + dest: 'reveal-js-presentation.zip' + } + }, + + watch: { + js: { + files: [ 'Gruntfile.js', 'js/reveal.js' ], + tasks: 'js' + }, + theme: { + files: [ + 'css/theme/source/*.sass', + 'css/theme/source/*.scss', + 'css/theme/template/*.sass', + 'css/theme/template/*.scss' + ], + tasks: 'css-themes' + }, + css: { + files: [ 'css/reveal.scss' ], + tasks: 'css-core' + }, + html: { + files: root.map(path => path + '/*.html') + }, + markdown: { + files: root.map(path => path + '/*.md') + }, + options: { + livereload: true + } + }, + + retire: { + js: [ 'js/reveal.js', 'lib/js/*.js', 'plugin/**/*.js' ], + node: [ '.' ] + } + + }); + + // Default task + grunt.registerTask( 'default', [ 'css', 'js' ] ); + + // JS task + grunt.registerTask( 'js', [ 'jshint', 'uglify', 'qunit' ] ); + + // Theme CSS + grunt.registerTask( 'css-themes', [ 'sass:themes' ] ); + + // Core framework CSS + grunt.registerTask( 'css-core', [ 'sass:core', 'autoprefixer', 'cssmin' ] ); + + // All CSS + grunt.registerTask( 'css', [ 'sass', 'autoprefixer', 'cssmin' ] ); + + // Package presentation to archive + grunt.registerTask( 'package', [ 'default', 'zip' ] ); + + // Serve presentation locally + grunt.registerTask( 'serve', [ 'connect', 'watch' ] ); + + // Run tests + grunt.registerTask( 'test', [ 'jshint', 'qunit' ] ); + +}; -- cgit v1.2.3 From 213023760ab2cfaad4db022844da97e692c2ea50 Mon Sep 17 00:00:00 2001 From: Hakim El Hattab Date: Thu, 28 Feb 2019 13:47:49 +0100 Subject: build dependency updates --- Gruntfile.ts | 5 ----- css/reveal.css | 6 +++--- package.json | 8 ++++---- test/test-markdown-external.html | 8 +++++--- test/test-pdf.html | 2 +- test/test.html | 6 +++--- 6 files changed, 16 insertions(+), 19 deletions(-) (limited to 'Gruntfile.ts') diff --git a/Gruntfile.ts b/Gruntfile.ts index f9c9dd6..1b7f31c 100644 --- a/Gruntfile.ts +++ b/Gruntfile.ts @@ -153,11 +153,6 @@ module.exports = function(grunt) { options: { livereload: true } - }, - - retire: { - js: [ 'js/reveal.js', 'lib/js/*.js', 'plugin/**/*.js' ], - node: [ '.' ] } }); diff --git a/css/reveal.css b/css/reveal.css index 51820c7..335fe82 100644 --- a/css/reveal.css +++ b/css/reveal.css @@ -249,7 +249,7 @@ body { visibility: hidden; opacity: 0; -webkit-appearance: none; - -webkit-tap-highlight-color: transparent; } + -webkit-tap-highlight-color: rgba(0, 0, 0, 0); } .reveal .controls .controls-arrow:before, .reveal .controls .controls-arrow:after { content: ''; @@ -1023,7 +1023,7 @@ body { opacity: 0; visibility: hidden; overflow: hidden; - background-color: transparent; + background-color: rgba(0, 0, 0, 0); transition: all 800ms cubic-bezier(0.26, 0.86, 0.44, 0.985); } .reveal .slide-background-content { @@ -1430,7 +1430,7 @@ body { z-index: 30; cursor: pointer; transition: all 400ms ease; - -webkit-tap-highlight-color: transparent; } + -webkit-tap-highlight-color: rgba(0, 0, 0, 0); } .reveal.overview .playback { opacity: 0; diff --git a/package.json b/package.json index c628f85..cd6ccbe 100644 --- a/package.json +++ b/package.json @@ -28,15 +28,15 @@ "grunt-cli": "^1.3.2", "grunt-autoprefixer": "^3.0.4", "grunt-contrib-connect": "^2.0.0", - "grunt-contrib-cssmin": "^2.2.1", + "grunt-contrib-cssmin": "^3.0.0", "grunt-contrib-jshint": "^2.0.0", - "grunt-contrib-qunit": "^2.0.0", + "grunt-contrib-qunit": "^3.1.0", "grunt-contrib-uglify": "^3.3.0", "grunt-contrib-watch": "^1.1.0", - "grunt-retire": "^1.0.7", - "grunt-sass": "^1.0.0", + "grunt-sass": "^3.0.2", "grunt-zip": "~0.17.1", "load-grunt-tasks": "^4.0.0", + "node-sass": "4.11.0", "mustache": "^2.3.0", "socket.io": "^2.2.0", "typescript": "^3.3.3333" diff --git a/test/test-markdown-external.html b/test/test-markdown-external.html index 76c6ae6..93cd983 100644 --- a/test/test-markdown-external.html +++ b/test/test-markdown-external.html @@ -13,12 +13,12 @@
- + @@ -29,7 +29,9 @@ - + + +