mirror of
https://github.com/hakimel/reveal.js.git
synced 2025-08-29 01:11:21 +02:00
add grunt sass theme task
This commit is contained in:
27
Gruntfile.js
27
Gruntfile.js
@@ -42,6 +42,19 @@ module.exports = function(grunt) {
|
||||
}
|
||||
},
|
||||
|
||||
sass: {
|
||||
main: {
|
||||
files: {
|
||||
'css/theme/default.css': 'css/theme/source/default.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'
|
||||
}
|
||||
},
|
||||
},
|
||||
|
||||
jshint: {
|
||||
options: {
|
||||
curly: false,
|
||||
@@ -64,8 +77,14 @@ module.exports = function(grunt) {
|
||||
},
|
||||
|
||||
watch: {
|
||||
files: [ 'Gruntfile.js', 'js/reveal.js', 'css/reveal.css' ],
|
||||
tasks: 'default'
|
||||
main: {
|
||||
files: [ 'Gruntfile.js', 'js/reveal.js', 'css/reveal.css' ],
|
||||
tasks: 'default'
|
||||
},
|
||||
theme: {
|
||||
files: [ 'css/theme/source/*.scss', 'css/theme/template/*.scss' ],
|
||||
tasks: 'themes'
|
||||
}
|
||||
}
|
||||
|
||||
});
|
||||
@@ -75,8 +94,12 @@ module.exports = function(grunt) {
|
||||
grunt.loadNpmTasks( 'grunt-contrib-cssmin' );
|
||||
grunt.loadNpmTasks( 'grunt-contrib-uglify' );
|
||||
grunt.loadNpmTasks( 'grunt-contrib-watch' );
|
||||
grunt.loadNpmTasks( 'grunt-contrib-sass' );
|
||||
|
||||
// Default task
|
||||
grunt.registerTask( 'default', [ 'jshint', 'cssmin', 'uglify' ] );
|
||||
|
||||
// Theme task
|
||||
grunt.registerTask( 'themes', [ 'sass' ] );
|
||||
|
||||
};
|
||||
|
Reference in New Issue
Block a user