module.exports = function (grunt) {
    require("matchdep").filterDev("grunt-*").forEach(grunt.loadNpmTasks);
    // Project configuration.  
    grunt.initConfig({
        pkg: grunt.file.readJSON('package.json'),
        cssmin: {
            styles: {
                files: {
                    'bundles/styles.min.css': [
                        'bower_components/pure/pure-min.css',
                        'bower_components/pure/grids-responsive-min.css',
                        'styles/blog.css',
                        'styles/app.css']
                }
            }
        },
        uglify: {
            options: {
                compress: false
            },
            externals: {
                files: {
                    'bundles/externals.min.js': [
                        'bower_components/angular/angular.min.js',
                        'bower_components/angular-route/angular-route.min.js',
                    ],
                }
            },
            scripts:{
                files: {
                    'bundles/scripts.min.js': [
                        'scripts/consts.js',
                        'scripts/post.js',
                        'scripts/spPosts.js',
                        'scripts/spMenu.js',
                        'scripts/postController.js',
                        'scripts/postsController.js',
                        'scripts/routingDefinition.js',
                        'scripts/app.js'
                    ],
                }
            }
        },
        watch: {
            externals: {
                files: [
                    'bower_components/angular/angular.min.js',
                    'bower_components/angular-route/angular-route.min.js',
                ],
                tasks: ['uglify:externals']
            },
            scripts: {
                files: [
                    'scripts/*.js'
                ],
                tasks: ['uglify:scripts']
            },
            css: {
                files: [
                    'bower_components/pure/pure-min.css',
                    'bower_components/pure/grids-responsive-min.css',
                    'styles/*.css'],
                tasks: ['cssmin']
            }
        },
        ftp_push: {
            deploy: {
                options: {
                    authKey: "ugu",
                    host: "stowpatriot.ugu.pl",
                    dest: "/",
                    port: 21
                },
                files: [
                    {
                        expand: true,
                        cwd: '.',
                        src: [
                            "images/*",
                            "favicon.ico",
                            "pages/*",
                            "bundles/*",
                            "index.html"
                        ]
                    }
                ]
            }
        }
    });
    // Default task.  
    grunt.registerTask('default', ['uglify', 'cssmin']);
    grunt.registerTask('deploy', ['ftp_push']);
};
@@ -2644,24 +2644,27 @@
    %22images/*
+*/*
 %22,%0A         
@@ -2729,24 +2729,27 @@
     %22pages/*
+*/*
 %22,%0A         
@@ -2777,16 +2777,19 @@
 undles/*
+*/*
 %22,%0A     
@@ -2907,150 +2907,1445 @@
    %7D
-%0A        %7D%0A    %7D);%0A    // Default task.  %0A    grunt.registerTask('default', %5B'uglify', 'cssmin'%5D);%0A    grunt.registerTask('deploy', %5B'ftp_push
+,%0A            deployCustom: %7B%0A                options: %7B%0A                    authKey: %22ugu%22,%0A                    host: %22stowpatriot.ugu.pl%22,%0A                    dest: %22/%22,%0A                    port: 21%0A                %7D,%0A                files: %5B%0A                    %7B%0A                        expand: true,%0A                        cwd: '.',%0A                        src: %5B%0A                            %22pages/**/*%22,%0A                            %22bundles/scripts.min.js%22,%0A                            %22bundles/styles.min.css%22,%0A                            %22index.html%22%0A                        %5D%0A                    %7D%0A                %5D%0A            %7D,%0A            deployScripts: %7B%0A                options: %7B%0A                    authKey: %22ugu%22,%0A                    host: %22stowpatriot.ugu.pl%22,%0A                    dest: %22/%22,%0A                    port: 21%0A                %7D,%0A                files: %5B%0A                    %7B%0A                        expand: true,%0A                        cwd: '.',%0A                        src: %5B%0A                            %22bundles/scripts.min.js%22,%0A                        %5D%0A                    %7D%0A                %5D%0A            %7D        %0A        %7D%0A    %7D);%0A    // Default task.  %0A    grunt.registerTask('default', %5B'uglify', 'cssmin'%5D);%0A    grunt.registerTask('deploy', %5B'ftp_push:deploy'%5D);%0A    grunt.registerTask('deployCustom', %5B'ftp_push:deployCustom'%5D);%0A    grunt.registerTask('deployScripts', %5B'ftp_push:deployScripts
 '%5D);

Automate deployment - define different modes