module.exports = function(grunt){
    grunt.initConfig({
        pkg: grunt.file.readJSON("package.json"),
        dir: {
            css: "css",
            js: "js",
            img: "img",
            vendor: "node_modules",
        },
        cssmin: {
            theme: {
                files: {
                    "<%= dir.css %>/theme.min.css": [
                        "<%= dir.css %>/theme/button.css",
                        "<%= dir.css %>/theme/grid.css",
                        "<%= dir.css %>/theme/navigation.css",
                        "<%= dir.css %>/theme/page.css",
                        "<%= dir.css %>/theme/page-header.css",
                        "<%= dir.css %>/theme/page-footer.css",
                        "<%= dir.css %>/theme/project-card.css",
                        "<%= dir.css %>/theme/project-cover.css",
                        "<%= dir.css %>/theme/user-card.css",
                    ],
                },
            }
        },
        concat: {
            options: {
                separator: ";",
                stripBanners: {
                    block: true,
                    line: true
                }
            },
            bundle_js: {
                files: {
                    "<%= dir.js %>/ie-compatibility.min.js": [
                        "<%= dir.vendor %>/html5shiv/dist/html5shiv.min.js",
                        "<%= dir.vendor %>/respond/dest/respond.min.js",
                    ],
                    "<%= dir.js %>/base.min.js": [
                        "<%= dir.js %>/base/underscore-small.js",
                        "<%= dir.js %>/base/page.js",
                        "<%= dir.js %>/base/ccl-analytics.min.js",
                        "<%= dir.js %>/base/analytics.js",
                        //"<%= dir.js %>/base/surveys.js",
                    ],
                }
            },
            bundle_minified_vendors: {
                files: {
                    "<%= dir.js %>/base.min.js": [
                        "<%= dir.js %>/base.min.js",
                        "<%= dir.vendor %>/jquery-smooth-scroll/jquery.smooth-scroll.min.js",
                    ],
                }
            },
        },
        zopfli: {
            css: {
                expand: true,
                cwd: "<%= dir.css %>",
                dest: "<%= dir.css %>",
                src: "**/*.min.css",
            },
            js: {
                expand: true,
                cwd: "<%= dir.js %>",
                dest: "<%= dir.js %>",
                src: "**/*.min.js",
            },
        },
    });
    grunt.loadNpmTasks("grunt-contrib-cssmin");
    grunt.loadNpmTasks("grunt-contrib-concat");
    grunt.loadNpmTasks("grunt-zopfli-native");

    grunt.registerTask("minify", ["cssmin:theme"]);
    grunt.registerTask("bundle", ["concat:bundle_js", "concat:bundle_minified_vendors"]);
    grunt.registerTask("compress", ["zopfli:css", "zopfli:js"]);
    grunt.registerTask("default", ["minify", "bundle", "compress"]);
};

@@ -351,34 +351,8 @@
 ss%22:
- %5B%0A                       
  %22%3C%25
@@ -374,14 +374,12 @@
 eme/
-button
+**/*
 .css
@@ -393,32 +393,35 @@
             
+%7D,%0A
         
 %22%3C%25= dir.css
@@ -412,40 +412,13 @@
     
-%22%3C%25= dir.css %25%3E/theme/grid.css%22,
+    %7D
 %0A   
@@ -418,32 +418,35 @@
   %7D%0A        
+%7D,%0A
         
         %22%3C%25=
@@ -437,116 +437,64 @@
     
-        %22%3C%25= dir.css %25%3E/theme/navigation.css%22,%0A                        %22%3C%25= dir.css %25%3E/theme/page.css%22,%0A    
+uglify: %7B%0A            theme: %7B%0A                files: %7B%0A
     
@@ -522,38 +522,29 @@
 dir.
-cs
+j
 s %25%3E/
-theme/page-header.css%22,
+base.min.js%22: %5B
 %0A   
@@ -577,35 +577,37 @@
 dir.
-cs
+j
 s %25%3E/
-theme/page-footer.cs
+base/underscore-small.j
 s%22,%0A
@@ -622,32 +622,34 @@
                 
+//
 %22%3C%25= dir.css %25%3E/
@@ -645,36 +645,28 @@
 dir.
-cs
+j
 s %25%3E/
-theme/project-card.cs
+base/surveys.j
 s%22,%0A
@@ -702,37 +702,30 @@
 dir.
-cs
+j
 s %25%3E/
-theme/project-cover.cs
+base/analytics.j
 s%22,%0A
@@ -761,36 +761,27 @@
 dir.
-cs
+j
 s %25%3E/
-theme/user-card.cs
+base/page.j
 s%22
-,
 %0A   
@@ -809,33 +809,32 @@
                %7D
-,
 %0A            %7D%0A 
@@ -1057,23 +1057,16 @@
         
-bundle_
 js: %7B%0A  
@@ -1412,89 +1412,63 @@
 dir.
-js %25%3E/base/underscore-small.js%22,%0A                        %22%3C%25= dir.js %25%3E/base/page
+vendor %25%3E/jquery-smooth-scroll/jquery.smooth-scroll.min
 .js%22
@@ -1517,16 +1517,24 @@
 ase/ccl-
+tracker/
 analytic
@@ -1591,77 +1591,12 @@
 base
-/analytics.js%22,%0A                        //%22%3C%25= dir.js %25%3E/base/surveys
+.min
 .js%22
@@ -1669,298 +1669,14 @@
     
-bundle_minified_vendors: %7B%0A                files: %7B%0A                    %22%3C%25= dir.js %25%3E/base.min.js%22: %5B%0A                        %22%3C%25= dir.js %25%3E/base.min.js%22,%0A                        %22%3C%25= dir.vendor %25%3E/jquery-smooth-scroll/jquery.smooth-scroll.min.js%22,%0A                    %5D,%0A                %7D
+css: %7B
 %0A   
@@ -1863,27 +1863,24 @@
      src: %22*
-*/*
 .min.css%22,%0A 
@@ -2041,19 +2041,16 @@
  src: %22*
-*/*
 .min.js%22
@@ -2129,24 +2129,72 @@
 b-cssmin%22);%0A
+    grunt.loadNpmTasks(%22grunt-contrib-uglify%22);%0A
     grunt.lo
@@ -2325,16 +2325,32 @@
 n:theme%22
+, %22uglify:theme%22
 %5D);%0A    
@@ -2391,16 +2391,10 @@
 cat:
-bundle_j
+cs
 s%22, 
@@ -2405,30 +2405,9 @@
 cat:
-bundle_minified_vendor
+j
 s%22%5D)

Rewrite the Grunt configuration file