vendor/reveal.js/Gruntfile.js in slide_hero-0.0.3 vs vendor/reveal.js/Gruntfile.js in slide_hero-0.0.4
- old
+ new
@@ -1,8 +1,8 @@
/* global module:false */
module.exports = function(grunt) {
-
+ var port = grunt.option('port') || 8000;
// Project configuration
grunt.initConfig({
pkg: grunt.file.readJSON('package.json'),
meta: {
banner:
@@ -13,13 +13,12 @@
' *\n' +
' * Copyright (C) 2013 Hakim El Hattab, http://hakim.se\n' +
' */'
},
- // Tests will be added soon
qunit: {
- files: [ 'test/**/*.html' ]
+ files: [ 'test/*.html' ]
},
uglify: {
options: {
banner: '<%= meta.banner %>\n'
@@ -46,11 +45,12 @@
'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',
'css/theme/moon.css': 'css/theme/source/moon.scss',
- 'css/theme/solarized.css': 'css/theme/source/solarized.scss'
+ 'css/theme/solarized.css': 'css/theme/source/solarized.scss',
+ 'css/theme/blood.css': 'css/theme/source/blood.scss'
}
}
},
jshint: {
@@ -67,20 +67,21 @@
browser: true,
expr: true,
globals: {
head: false,
module: false,
- console: false
+ console: false,
+ unescape: false
}
},
files: [ 'Gruntfile.js', 'js/reveal.js' ]
},
connect: {
server: {
options: {
- port: 8000,
+ port: port,
base: '.'
}
}
},
@@ -107,26 +108,30 @@
}
});
// 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-contrib-connect' );
grunt.loadNpmTasks( 'grunt-zip' );
// Default task
- grunt.registerTask( 'default', [ 'jshint', 'cssmin', 'uglify' ] );
+ grunt.registerTask( 'default', [ 'jshint', 'cssmin', 'uglify', 'qunit' ] );
// Theme task
grunt.registerTask( 'themes', [ 'sass' ] );
// Package presentation to archive
grunt.registerTask( 'package', [ 'default', 'zip' ] );
// Serve presentation locally
grunt.registerTask( 'serve', [ 'connect', 'watch' ] );
+
+ // Run tests
+ grunt.registerTask( 'test', [ 'jshint', 'qunit' ] );
};