vendor/reveal.js/Gruntfile.js in slide_hero-0.0.8 vs vendor/reveal.js/Gruntfile.js in slide_hero-0.0.9

- old
+ new

@@ -9,11 +9,11 @@ '/*!\n' + ' * reveal.js <%= pkg.version %> (<%= grunt.template.today("yyyy-mm-dd, HH:MM") %>)\n' + ' * http://lab.hakim.se/reveal-js\n' + ' * MIT licensed\n' + ' *\n' + - ' * Copyright (C) 2013 Hakim El Hattab, http://hakim.se\n' + + ' * Copyright (C) 2015 Hakim El Hattab, http://hakim.se\n' + ' */' }, qunit: { files: [ 'test/*.html' ] @@ -27,22 +27,21 @@ src: 'js/reveal.js', dest: 'js/reveal.min.js' } }, - cssmin: { - compress: { + sass: { + core: { files: { - 'css/reveal.min.css': [ 'css/reveal.css' ] + 'css/reveal.css': 'css/reveal.scss', } - } - }, - - sass: { - main: { + }, + themes: { files: { - 'css/theme/default.css': 'css/theme/source/default.scss', + 'css/theme/black.css': 'css/theme/source/black.scss', + 'css/theme/white.css': 'css/theme/source/white.scss', + 'css/theme/league.css': 'css/theme/source/league.scss', 'css/theme/beige.css': 'css/theme/source/beige.scss', 'css/theme/night.css': 'css/theme/source/night.scss', 'css/theme/serif.css': 'css/theme/source/serif.scss', 'css/theme/simple.css': 'css/theme/source/simple.scss', 'css/theme/sky.css': 'css/theme/source/sky.scss', @@ -51,10 +50,24 @@ 'css/theme/blood.css': 'css/theme/source/blood.scss' } } }, + autoprefixer: { + dist: { + src: 'css/reveal.css' + } + }, + + cssmin: { + compress: { + files: { + 'css/reveal.min.css': [ 'css/reveal.css' ] + } + } + }, + jshint: { options: { curly: false, eqeqeq: true, immed: true, @@ -68,21 +81,25 @@ expr: true, globals: { head: false, module: false, console: false, - unescape: false + unescape: false, + define: false, + exports: false } }, files: [ 'Gruntfile.js', 'js/reveal.js' ] }, connect: { server: { options: { port: port, - base: '.' + base: '.', + livereload: true, + open: true } } }, zip: { @@ -95,36 +112,56 @@ 'plugin/**' ] }, watch: { - main: { - files: [ 'Gruntfile.js', 'js/reveal.js', 'css/reveal.css' ], - tasks: 'default' + options: { + livereload: true + }, + js: { + files: [ 'Gruntfile.js', 'js/reveal.js' ], + tasks: 'js' }, theme: { files: [ 'css/theme/source/*.scss', 'css/theme/template/*.scss' ], - tasks: 'themes' - } + tasks: 'css-themes' + }, + css: { + files: [ 'css/reveal.scss' ], + tasks: 'css-core' + }, + html: { + files: [ 'index.html'] + } } }); // Dependencies grunt.loadNpmTasks( 'grunt-contrib-qunit' ); grunt.loadNpmTasks( 'grunt-contrib-jshint' ); grunt.loadNpmTasks( 'grunt-contrib-cssmin' ); grunt.loadNpmTasks( 'grunt-contrib-uglify' ); grunt.loadNpmTasks( 'grunt-contrib-watch' ); - grunt.loadNpmTasks( 'grunt-contrib-sass' ); + grunt.loadNpmTasks( 'grunt-sass' ); grunt.loadNpmTasks( 'grunt-contrib-connect' ); + grunt.loadNpmTasks( 'grunt-autoprefixer' ); grunt.loadNpmTasks( 'grunt-zip' ); // Default task - grunt.registerTask( 'default', [ 'jshint', 'cssmin', 'uglify', 'qunit' ] ); + grunt.registerTask( 'default', [ 'css', 'js' ] ); - // Theme task - grunt.registerTask( 'themes', [ 'sass' ] ); + // 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