/**
 * 
 */
module.exports = function (grunt) {
  
  
  var prefix = 'grunt-contrib-',
    npms = [ 
            'jshint', 
            'less',
            'symlink',
            'requirejs',
    ];

  grunt.initConfig({
    
    pkg: grunt.file.readJSON('package.json'),
        
    jshint: {
          options: {
              reporter: require('jshint-stylish'),
              laxcomma: true
          },
          target: [
               'app/collections/*.js'
             , 'app/models/*.js'
             , 'app/routers/*.js'
             , 'app/views/*.js'
          ]
    },
        
    less: {
      main : {    
        src:  'app/assets/less/compile.less',
        dest: 'app/dist/css/compile.css'
      },
    },
    
    symlink: {
      options: {
        overwrite: true
      },
      fonts: {
        src:  'app/vendor/bootstrap/fonts',
        dest: 'app/dist/fonts'
      },  
    },
    

    requirejs: {
      compile: {
        options: {    
          baseUrl: 'app',  
          
          paths: {
            jquery: 'vendor/jquery/dist/jquery',
            underscore: 'vendor/underscore/underscore',
            backbone: 'vendor/backbone/backbone',
            text: 'vendor/text/text',
            bootstrap: 'vendor/bootstrap/dist/js/bootstrap',
            templates: 'views/templates',
          },
          
          name: 'main',
          out: 'app/main-built.js',
          preserveLicenseComments: false,
          findNestedDependencies  : true,
          enforceDefine: false,
        }
      }
    }
    
  });
  
  npms.forEach(function(key) {
    grunt.loadNpmTasks(prefix + key);
  });
  
  grunt.registerTask('default', ['less', 'symlink']);
  grunt.registerTask('js', ['jshint']);
  grunt.registerTask('optimize', ['requirejs']);
};
@@ -43,18 +43,16 @@
 nt) %7B%0A  
-%0A 
  %0A  var 
@@ -58,16 +58,17 @@
  prefix 
+ 
 = 'grunt
@@ -81,35 +81,26 @@
 ib-'
-,
 %0A   
+ ,
  npms 
-= %5B %0A        
    
+= %5B
  'js
@@ -108,11 +108,13 @@
 int'
-, %0A
+%0A    
     
@@ -124,17 +124,20 @@
     
+ ,
  'less'
-,
 %0A
+  
     
@@ -143,16 +143,20 @@
         
+   ,
  'symlin
@@ -157,18 +157,18 @@
 symlink'
-,
 %0A
+ 
         
@@ -170,16 +170,21 @@
         
+    ,
  'requir
@@ -187,18 +187,29 @@
 quirejs'
-,
 %0A
+            
     %5D;%0A%0A
@@ -305,28 +305,24 @@
 nt: %7B%0A      
-    
 options: %7B%0A 
@@ -330,20 +330,16 @@
         
-   
- 
 reporter
@@ -377,20 +377,16 @@
         
-    
 laxcomma
@@ -398,33 +398,25 @@
 e%0A      
-    %7D,%0A   
+%7D,%0A
       
- 
 target: 
@@ -416,32 +416,16 @@
 arget: %5B
-%0A               
 'app/col
@@ -431,32 +431,33 @@
 llections/*.js'%0A
+ 
              , '
@@ -482,24 +482,25 @@
             
+ 
 , 'app/route
@@ -517,24 +517,25 @@
             
+ 
 , 'app/views
@@ -533,32 +533,36 @@
 app/views/*.js'%0A
+    
           %5D%0A    
@@ -890,17 +890,16 @@
 %7D,%0A    %0A
-%0A
     requ
@@ -974,18 +974,16 @@
 'app',  
-%0A 
         
@@ -1307,26 +1307,24 @@
           %7D,
-%0A 
          %0A  
@@ -1520,18 +1520,16 @@
  %7D%0A    %7D
-%0A 
    %0A  %7D)

Correct indentation