'use strict';

module.exports = function (grunt) {

    // External Dependencies import
    require('grunt-contrib-copy/tasks/copy.js')(grunt);

    function loadConfig(grunt) {
        return {
            // COPYS FILES FROM APP TO DIST
            copy: {
                components: {
                    files: [
                        {
                            expand: true,
                            dot: true,
                            cwd: 'app',
                            dest: 'dist',
                            src: [
                                '.htaccess',
                                'bower_components/**/*.html',
                                'app_components/**/*.html',
                                'views/**/*.html',
                                'index.html'
                            ]
                        }
                    ]
                },
                js: {
                    files: [
                        {
                            expand: true,
                            dot: true,
                            cwd: '.tmp/concat/scripts/',
                            dest: 'dist/scripts/',
                            src: ['*.js']
                        }
                    ]
                },
                font: {
                    files: [
                        {
                            expand: true,
                            dot: true,
                            cwd: 'app',
                            src: [
                                'styles/css/bootstrap/fonts',
                                'bower_components/ecosystem-main-frontend/release/styles/bootstrap/fonts'
                            ],
                            dest: 'dist/styles/fonts'
                        }
                    ]
                },
                img: {
                    files: [
                        {
                            expand: true,
                            dot: true,
                            cwd: 'app',
                            src: ['bower_components/ecosystem-main-frontend/release/images/**/*','images/placeholder/*', 'styles/img/**/*'],
                            dest: 'dist'
                        }
                    ]
                },
                release: {
                    files: [
                        {
                            expand: true,
                            dot: true,
                            cwd: 'app/app_components/pageModule/',
                            dest: 'release/',
                            src: [
                                '**/*'
                            ]
                        }
                    ]
                }
            }
        };
    }

    grunt.registerTask('devbliss-copy', function () {
            grunt.config.merge(loadConfig(grunt));
            grunt.task.run(['copy']);
        }
    );
};

@@ -1564,16 +1564,21 @@
 ap/fonts
+/**/*
 ',%0A     
@@ -1672,24 +1672,29 @@
 tstrap/fonts
+/**/*
 '%0A          
@@ -1757,21 +1757,8 @@
 dist
-/styles/fonts
 '%0A  
@@ -2055,16 +2055,49 @@
   src: %5B
+%0A                                
 'bower_c
@@ -2155,31 +2155,96 @@
 /*',
-'images/placeholder/*',
+%0A                                'images/placeholder/*',%0A                               
  'st

copy font files, not only directories