/* global module:false */ 'use strict'; module.exports = function (grunt) { // Project configuration grunt.initConfig({ // Metadata pkg: grunt.file.readJSON('package.json'), banner: '/*! <%= pkg.title || pkg.name %> - v<%= pkg.version %> - ' + '<%= grunt.template.today("yyyy-mm-dd") %>\n' + '<%= pkg.homepage ? "* " + pkg.homepage + "\\n" : "" %>' + '* Copyright (c) <%= grunt.template.today("yyyy") %> <%= pkg.author.name %>; */\n', // Tasks configuration compass: { options: { basePath: 'public', sassDir: 'stylesheets/scss', imagesDir: 'images', javascriptsDir: 'javascripts' }, dev: { options: { cssDir: 'stylesheets/dev' } }, dist: { options: { cssDir: 'stylesheets/dist', environment: 'production' } } }, concat: { options: { banner: '<%= banner %>', stripBanners: true }, dist: { src: '<%= jshint.all.src %>', dest: 'public/javascripts/<%= pkg.name %>.js' } }, jshint: { options: { jshintrc: '.jshintrc' }, all: { src: ['public/javascripts/lib/**/*.js', 'public/javascripts/src/**/*.js'] } }, uglify: { options: { banner: '<%= banner %>' }, dist: { files: { 'public/javascripts/<%= pkg.name %>.min.js': '<%= concat.dist.dest %>' } } }, watch: { all: { files: '<%= jshint.all.src %>', tasks: ['jshint:lib_src', 'concat', 'uglify'] } } }); // Tasks load grunt.loadNpmTasks('grunt-contrib-compass'); grunt.loadNpmTasks('grunt-contrib-concat'); grunt.loadNpmTasks('grunt-contrib-jshint'); grunt.loadNpmTasks('grunt-contrib-uglify'); grunt.loadNpmTasks('grunt-contrib-watch'); // Tasks declaration grunt.registerTask('default', ['compass', 'jshint', 'concat', 'uglify']); };