Mercurial > hg > rr-repo
view sites/all/themes/rrr/Gruntfile.js @ 0:ff03f76ab3fe
initial version
author | danieleb <danielebarchiesi@me.com> |
---|---|
date | Wed, 21 Aug 2013 18:51:11 +0100 |
parents | |
children |
line wrap: on
line source
'use strict'; module.exports = function (grunt) { grunt.initConfig({ watch: { options: { livereload: true }, sass: { files: ['sass/{,**/}*.{scss,sass}'], tasks: ['compass:dev'], options: { livereload: false } }, registry: { files: ['*.info', '{,**}/*.{php,inc}'], tasks: ['shell'], options: { livereload: false } }, images: { files: ['images/**'] }, css: { files: ['css/{,**/}*.css'] }, js: { files: ['js/{,**/}*.js', '!js/{,**/}*.min.js'], tasks: ['jshint', 'uglify:dev'] } }, shell: { all: { command: 'drush cache-clear theme-registry' } }, compass: { options: { config: 'config.rb', bundleExec: true }, dev: { options: { environment: 'development', force: true } }, dist: { options: { environment: 'production', force: true } } }, jshint: { options: { jshintrc: '.jshintrc' }, all: ['js/{,**/}*.js', '!js/{,**/}*.min.js'] }, uglify: { dev: { options: { mangle: false, compress: false, beautify: true }, files: [{ expand: true, cwd: 'js', src: ['**/*.js', '!**/*.min.js'], dest: 'js', ext: '.min.js' }] }, dist: { options: { mangle: true, compress: true }, files: [{ expand: true, cwd: 'js', src: ['**/*.js', '!**/*.min.js'], dest: 'js', ext: '.min.js' }] } } }); grunt.loadNpmTasks('grunt-contrib-watch'); grunt.loadNpmTasks('grunt-contrib-compass'); grunt.loadNpmTasks('grunt-contrib-jshint'); grunt.loadNpmTasks('grunt-contrib-uglify'); grunt.loadNpmTasks('grunt-shell'); grunt.registerTask('build', [ 'uglify:dist', 'compass:dist', 'jshint' ]); };