1
1
/* global module:false */
2
2
module . exports = function ( grunt ) {
3
-
3
+ var port = grunt . option ( 'port' ) || 8000 ;
4
4
// Project configuration
5
5
grunt . initConfig ( {
6
6
pkg : grunt . file . readJSON ( 'package.json' ) ,
@@ -15,9 +15,8 @@ module.exports = function(grunt) {
15
15
' */'
16
16
} ,
17
17
18
- // Tests will be added soon
19
18
qunit : {
20
- files : [ 'test/**/* .html' ]
19
+ files : [ 'test/*.html' ]
21
20
} ,
22
21
23
22
uglify : {
@@ -48,7 +47,8 @@ module.exports = function(grunt) {
48
47
'css/theme/simple.css' : 'css/theme/source/simple.scss' ,
49
48
'css/theme/sky.css' : 'css/theme/source/sky.scss' ,
50
49
'css/theme/moon.css' : 'css/theme/source/moon.scss' ,
51
- 'css/theme/solarized.css' : 'css/theme/source/solarized.scss' ,
50
+ 'css/theme/solarized.css' : 'css/theme/source/solarized.scss' ,
51
+ 'css/theme/blood.css' : 'css/theme/source/blood.scss' ,
52
52
'css/theme/solita.css' : 'css/theme/source/solita.scss'
53
53
}
54
54
}
@@ -70,7 +70,8 @@ module.exports = function(grunt) {
70
70
globals : {
71
71
head : false ,
72
72
module : false ,
73
- console : false
73
+ console : false ,
74
+ unescape : false
74
75
}
75
76
} ,
76
77
files : [ 'Gruntfile.js' , 'js/reveal.js' ]
@@ -79,7 +80,7 @@ module.exports = function(grunt) {
79
80
connect : {
80
81
server : {
81
82
options : {
82
- port : 8000 ,
83
+ port : port ,
83
84
base : '.'
84
85
}
85
86
}
@@ -110,6 +111,7 @@ module.exports = function(grunt) {
110
111
} ) ;
111
112
112
113
// Dependencies
114
+ grunt . loadNpmTasks ( 'grunt-contrib-qunit' ) ;
113
115
grunt . loadNpmTasks ( 'grunt-contrib-jshint' ) ;
114
116
grunt . loadNpmTasks ( 'grunt-contrib-cssmin' ) ;
115
117
grunt . loadNpmTasks ( 'grunt-contrib-uglify' ) ;
@@ -119,7 +121,7 @@ module.exports = function(grunt) {
119
121
grunt . loadNpmTasks ( 'grunt-zip' ) ;
120
122
121
123
// Default task
122
- grunt . registerTask ( 'default' , [ 'jshint' , 'cssmin' , 'uglify' ] ) ;
124
+ grunt . registerTask ( 'default' , [ 'jshint' , 'cssmin' , 'uglify' , 'qunit' ] ) ;
123
125
124
126
// Theme task
125
127
grunt . registerTask ( 'themes' , [ 'sass' ] ) ;
@@ -130,4 +132,7 @@ module.exports = function(grunt) {
130
132
// Serve presentation locally
131
133
grunt . registerTask ( 'serve' , [ 'connect' , 'watch' ] ) ;
132
134
135
+ // Run tests
136
+ grunt . registerTask ( 'test' , [ 'jshint' , 'qunit' ] ) ;
137
+
133
138
} ;
0 commit comments