Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- module.exports = function(grunt) {
- // Project configuration.
- grunt.initConfig({
- pkg: grunt.file.readJSON('package.json'),
- // CONFIG ===================================/
- watch: {
- compass: {
- files: ['assets/**/*.{scss,sass}'],
- tasks: ['compass:dist']
- },
- js: {
- files: ['assets/**/*.js'],
- tasks: ['uglify']
- },
- img: {
- files: ['assets/**/*.{png,jpg,jpeg,gif}'],
- tasks: ['imagemin']
- }
- },
- compass: {
- dist: {
- options: {
- config: 'config/config.rb'
- }
- }
- },
- uglify: {
- all: {
- files: {
- 'assets/js/min/main.min.js': [
- 'assets/js/libs/jquery.js',
- 'assets/js/main.js'
- ]
- }
- }
- },
- imagemin: {
- dist: {
- options: {
- optimizationLevel: 3
- },
- files: {
- 'assets/img/img.png': 'assets/img/opt/img.png', // 'destination': 'source'
- 'assets/img/img.jpg': 'assets/img/opt/img.jpg',
- 'assets/img/img.gif': 'assets/img/opt/img.gif'
- }
- }
- }
- });
- // DEPENDENT PLUGINS =========================/
- grunt.loadNpmTasks('grunt-contrib-watch');
- grunt.loadNpmTasks('grunt-contrib-compass');
- grunt.loadNpmTasks('grunt-contrib-uglify');
- grunt.loadNpmTasks('grunt-contrib-imagemin');
- // TASKS =====================================/
- grunt.registerTask('default', [
- 'compass:dist',
- 'uglify',
- 'imagemin',
- 'watch'
- ]);
- };
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement