module.exports = function(grunt) {

  // Project configuration.
  grunt.initConfig({
    pkg: grunt.file.readJSON('package.json'),
    watch: {
      css: {
        files: [
          '**/**/*.less'
        ],
        tasks: ['less']
      }
    },
    jshint: {
      options: {
        jshintrc: '.jshintrc'
      },
      all: ['Gruntfile.js', 'public/js/*.js']
    },
    less: {
      development: {
        options: {
          paths: ["public/css"],
          report: 'min',
          compress: true, 
          yuicompress: true
        },
        files: {
          //shared
          "public/css/shared/styleguide.css": "public/css/shared/styleguide.less",

          //login
          "public/css/login/login.css": "public/css/login/login.less",

          //landing page
          "public/css/landing/landing.css": "public/css/landing/landing.less",

          //dashboards
          "public/css/dashboards/dashboard.css": "public/css/dashboards/dashboard.less",

          //worker
          "public/css/worker/profile.css": "public/css/worker/profile.less",
          "public/css/worker/progress.css": "public/css/worker/progress.less",
          "public/css/worker/calendar.css": "public/css/worker/calendar.less",
          "public/css/worker/travel.css": "public/css/worker/travel.less",
          "public/css/worker/tutorials.css": "public/css/worker/tutorials.less",
          "public/css/worker/messages.css" : "public/css/worker/messages.less",

          //client
          "public/css/client/worker/client-worker-list.css": "public/css/client/worker/client-worker-list.less",
          "public/css/client/worker/progress-show.css": "public/css/client/worker/progress-show.less"
        }
      }
    }
  });

  // Load the Grunt plugins.
  grunt.loadNpmTasks('grunt-contrib-watch');
  grunt.loadNpmTasks('grunt-contrib-jshint');
  grunt.loadNpmTasks('grunt-contrib-less');

  // Register the default tasks.
  grunt.registerTask('default', ['watch']);
};