mirror of
https://github.com/adulau/brouilleursdeblanc.git
synced 2024-11-22 01:57:08 +00:00
e711f8b839
- Cleanup _config.yml - Move navigation and author info to data files - Convert .less stylesheets to .scss - Update documentation - Include Octopress gem for new post/page creation
84 lines
No EOL
1.6 KiB
JavaScript
84 lines
No EOL
1.6 KiB
JavaScript
'use strict';
|
|
module.exports = function(grunt) {
|
|
|
|
grunt.initConfig({
|
|
jshint: {
|
|
options: {
|
|
jshintrc: '.jshintrc'
|
|
},
|
|
all: [
|
|
'Gruntfile.js',
|
|
'assets/js/*.js',
|
|
'assets/js/plugins/*.js',
|
|
'!assets/js/scripts.min.js'
|
|
]
|
|
},
|
|
uglify: {
|
|
dist: {
|
|
files: {
|
|
'assets/js/scripts.min.js': [
|
|
'assets/js/plugins/*.js',
|
|
'assets/js/_*.js'
|
|
]
|
|
}
|
|
}
|
|
},
|
|
imagemin: {
|
|
dist: {
|
|
options: {
|
|
optimizationLevel: 7,
|
|
progressive: true
|
|
},
|
|
files: [{
|
|
expand: true,
|
|
cwd: 'images/',
|
|
src: '{,*/}*.{png,jpg,jpeg}',
|
|
dest: 'images/'
|
|
}]
|
|
}
|
|
},
|
|
svgmin: {
|
|
dist: {
|
|
files: [{
|
|
expand: true,
|
|
cwd: 'images/',
|
|
src: '{,*/}*.svg',
|
|
dest: 'images/'
|
|
}]
|
|
}
|
|
},
|
|
watch: {
|
|
js: {
|
|
files: [
|
|
'<%= jshint.all %>'
|
|
],
|
|
tasks: ['uglify']
|
|
}
|
|
},
|
|
clean: {
|
|
dist: [
|
|
'assets/js/scripts.min.js'
|
|
]
|
|
}
|
|
});
|
|
|
|
// Load tasks
|
|
grunt.loadNpmTasks('grunt-contrib-clean');
|
|
grunt.loadNpmTasks('grunt-contrib-jshint');
|
|
grunt.loadNpmTasks('grunt-contrib-uglify');
|
|
grunt.loadNpmTasks('grunt-contrib-watch');
|
|
grunt.loadNpmTasks('grunt-contrib-imagemin');
|
|
grunt.loadNpmTasks('grunt-svgmin');
|
|
|
|
// Register tasks
|
|
grunt.registerTask('default', [
|
|
'clean',
|
|
'uglify',
|
|
'imagemin',
|
|
'svgmin'
|
|
]);
|
|
grunt.registerTask('dev', [
|
|
'watch'
|
|
]);
|
|
|
|
}; |