<commit_before>var pjson = require('./package.json');
var version = pjson.version;

module.exports = function (grunt) {

    grunt.initConfig({

        clean: ["build", "build_temp"],

        concat: {
            js_filehub: {
                src: ['js/fileHubManager.js', 'js/filehub.js', 'js/api/dropzone.js'],
                dest: 'build_temp/js/filehub.js'
            },

            css_filehub: {
                src: ['css/filehub/filehub.css', 'css/dropzone.css'],
                dest: 'build_temp/css/filehub.css'
            }
        },

        uglify: {
            options: {
                mangle: false,
                preserveComments: require('uglify-save-license')
            },
            target: {
                files: {
                    'build/js/script.min.js': ['js/script.js'],
                    'build/js/filehub.min.js': ['build_temp/js/filehub.js'],
                    'build/js/jquery-2.1.1.min.js': ['js/api/jquery-2.1.1.js'],
                    'build/js/includes/header.min.js': ['js/includes/header.js']
                }
            }
        },

        cssmin: {
            options: {
                shorthandCompacting: false,
                roundingPrecision: -1
            },
            target: {
                files: {
                    // about css
                    'build/css/filehub/filehub.min.css': ['build_temp/css/filehub.css'],
                    'build/css/filehub/filehub_319.min.css': ['css/filehub/filehub_319.css'],
                    'build/css/filehub/filehub_420.min.css': ['css/filehub/filehub_420.css'],
                    'build/css/filehub/filehub_479.min.css': ['css/filehub/filehub_479.css'],
                    'build/css/filehub/filehub_767.min.css': ['css/filehub/filehub_767.css'],
                    'build/css/filehub/filehub_960.min.css': ['css/filehub/filehub_960.css'],

                    // home css
                    'build/css/home/stylesheet.min.css': ['css/home/stylesheet.css'],
                    'build/css/home/stylesheet_319.min.css': ['css/home/stylesheet_319.css'],
                    'build/css/home/stylesheet_479.min.css': ['css/home/stylesheet_479.css'],
                    'build/css/home/stylesheet_767.min.css': ['css/home/stylesheet_767.css'],
                    'build/css/home/stylesheet_960.min.css': ['css/home/stylesheet_960.css'],

                    // error screen
                    'build/css/errorScreen/errorScreen.min.css': ['css/errorScreen/errorScreen.css'],

                    // includes
                    'build/css/includes/includes.min.css': ['css/includes/includes.css'],
                    'build/css/includes/header.min.css': ['css/includes/header.css']
                }
            }
        },

        imagemin: {
            dynamic: {
                options: {
                    optimizationLevel: 3
                },
                files: [{
                    expand: true,
                    cwd: 'images/',
                    src: ['**/*.{png,jpg,gif}'],
                    dest: 'build/images'
                }]
            }
        },

        replace: {
            index: {
                src: ['index.php'],
                dest: 'build/',
                replacements: [{
                    from: 'css/home/stylesheet.css',
                    to: 'css/home/stylesheet.min.css'
                }, {
                    from: 'stylesheet_960',
                    to: 'stylesheet_960.min'
                }, {
                    from: 'stylesheet_767',
                    to: 'stylesheet_767.min'
                }, {
                    from: 'stylesheet_479',
                    to: 'stylesheet_479.min'
                }, {
                    from: 'stylesheet_319',
                    to: 'stylesheet_319.min'
                }, {
                    from: 'js/api/jquery-2.1.1.js',
                    to: 'js/jquery-2.1.1.min.js'
                }, {
                    from: 'js/script.js',
                    to: 'js/script.min.js'
                }]
            },

            filehub: {
                src: ['filehub.php'],
                dest: 'build/',
                replacements: [{
                    from: 'css/filehub/filehub.css',
                    to: 'css/filehub/filehub.min.css'
                }, {
                    from: 'filehub_960',
                    to: 'filehub_960.min'
                }, {
                    from: 'filehub_767',
                    to: 'filehub_767.min'
                }, {
                    from: 'filehub_479',
                    to: 'filehub_479.min'
                }, {
                    from: 'filehub_420',
                    to: 'filehub_420.min'
                }, {
                    from: 'filehub_319',
                    to: 'filehub_319.min'
                }, {
                    from: '<script type="text/javascript" src="js/api/dropzone.js"></script>',
                    to: ''
                }, {
                    from: '<link rel="stylesheet" href="css/dropzone.css">',
                    to: ''
                }, {
                    from: '<script type="text/javascript" src="js/fileHubManager.js"></script>',
                    to: ''
                }, {
                    from: 'js/api/jquery-2.1.1.js',
                    to: 'js/jquery-2.1.1.min.js'
                }, {
                    from: 'js/filehub.js',
                    to: 'js/filehub.min.js'
                }, {
                    from: 'css/filehub/filehub.css',
                    to: 'css/filehub/filehub.min.css'
                }]
            },

            errorScreen: {
                src: ['errorScreen.php'],
                dest: 'build/',
                replacements: [{
                    from: 'css/errorScreen/errorScreen.css',
                    to: 'css/errorScreen/errorScreen.min.css'
                }]
            },

            includes: {
                src: ['includes/top.php'],
                dest: 'build/includes/',
                replacements: [{
                    from: 'css/includes/includes.css',
                    to: 'css/includes/includes.min.css'
                }]
            },

            header: {
                src: ['includes/header.php'],
                dest: 'build/includes/',
                replacements: [{
                    from: 'css/includes/header.css',
                    to: 'css/includes/header.min.css'
                }, {
                    from: 'js/api/jquery-2.1.1.js',
                    to: 'js/jquery-2.1.1.min.js'
                }, {
                    from: 'js/includes/header.js',
                    to: 'js/includes/header.min.js'
                }]
            }
        },

        copy: {
            main: {
                files: [
                    // Folders
                    {expand: true, src: ['config/**'], dest: 'build/'},
                    {expand: true, src: ['favicon/**'], dest: 'build/'},
                    {expand: true, src: ['fonts/**'], dest: 'build/'},
                    {expand: true, src: ['php/**'], dest: 'build/'},
                    {expand: true, src: ['includes/**', '!includes/header.php', '!includes/top.php'], dest: 'build/'},

                    // Files
                    {expand: true, src: ['images/file_icons/LICENSE'], dest: 'build/'},
                    {expand: true, src: ['images/file_icons/README.md'], dest: 'build/'}
                ]
            }
        },

        mkdir: {
            upload_data: {
                options: {
                    mode: 0755,
                    create: ['build/upload_data']<commit_msg>added license and readme into build folder<commit_after>var pjson = require('./package.json');
var version = pjson.version;

module.exports = function (grunt) {

    grunt.initConfig({

        clean: ["build", "build_temp"],

        concat: {
            js_filehub: {
                src: ['js/fileHubManager.js', 'js/filehub.js', 'js/api/dropzone.js'],
                dest: 'build_temp/js/filehub.js'
            },

            css_filehub: {
                src: ['css/filehub/filehub.css', 'css/dropzone.css'],
                dest: 'build_temp/css/filehub.css'
            }
        },

        uglify: {
            options: {
                mangle: false,
                preserveComments: require('uglify-save-license')
            },
            target: {
                files: {
                    'build/js/script.min.js': ['js/script.js'],
                    'build/js/filehub.min.js': ['build_temp/js/filehub.js'],
                    'build/js/jquery-2.1.1.min.js': ['js/api/jquery-2.1.1.js'],
                    'build/js/includes/header.min.js': ['js/includes/header.js']
                }
            }
        },

        cssmin: {
            options: {
                shorthandCompacting: false,
                roundingPrecision: -1
            },
            target: {
                files: {
                    // about css
                    'build/css/filehub/filehub.min.css': ['build_temp/css/filehub.css'],
                    'build/css/filehub/filehub_319.min.css': ['css/filehub/filehub_319.css'],
                    'build/css/filehub/filehub_420.min.css': ['css/filehub/filehub_420.css'],
                    'build/css/filehub/filehub_479.min.css': ['css/filehub/filehub_479.css'],
                    'build/css/filehub/filehub_767.min.css': ['css/filehub/filehub_767.css'],
                    'build/css/filehub/filehub_960.min.css': ['css/filehub/filehub_960.css'],

                    // home css
                    'build/css/home/stylesheet.min.css': ['css/home/stylesheet.css'],
                    'build/css/home/stylesheet_319.min.css': ['css/home/stylesheet_319.css'],
                    'build/css/home/stylesheet_479.min.css': ['css/home/stylesheet_479.css'],
                    'build/css/home/stylesheet_767.min.css': ['css/home/stylesheet_767.css'],
                    'build/css/home/stylesheet_960.min.css': ['css/home/stylesheet_960.css'],

                    // error screen
                    'build/css/errorScreen/errorScreen.min.css': ['css/errorScreen/errorScreen.css'],

                    // includes
                    'build/css/includes/includes.min.css': ['css/includes/includes.css'],
                    'build/css/includes/header.min.css': ['css/includes/header.css']
                }
            }
        },

        imagemin: {
            dynamic: {
                options: {
                    optimizationLevel: 3
                },
                files: [{
                    expand: true,
                    cwd: 'images/',
                    src: ['**/*.{png,jpg,gif}'],
                    dest: 'build/images'
                }]
            }
        },

        replace: {
            index: {
                src: ['index.php'],
                dest: 'build/',
                replacements: [{
                    from: 'css/home/stylesheet.css',
                    to: 'css/home/stylesheet.min.css'
                }, {
                    from: 'stylesheet_960',
                    to: 'stylesheet_960.min'
                }, {
                    from: 'stylesheet_767',
                    to: 'stylesheet_767.min'
                }, {
                    from: 'stylesheet_479',
                    to: 'stylesheet_479.min'
                }, {
                    from: 'stylesheet_319',
                    to: 'stylesheet_319.min'
                }, {
                    from: 'js/api/jquery-2.1.1.js',
                    to: 'js/jquery-2.1.1.min.js'
                }, {
                    from: 'js/script.js',
                    to: 'js/script.min.js'
                }]
            },

            filehub: {
                src: ['filehub.php'],
                dest: 'build/',
                replacements: [{
                    from: 'css/filehub/filehub.css',
                    to: 'css/filehub/filehub.min.css'
                }, {
                    from: 'filehub_960',
                    to: 'filehub_960.min'
                }, {
                    from: 'filehub_767',
                    to: 'filehub_767.min'
                }, {
                    from: 'filehub_479',
                    to: 'filehub_479.min'
                }, {
                    from: 'filehub_420',
                    to: 'filehub_420.min'
                }, {
                    from: 'filehub_319',
                    to: 'filehub_319.min'
                }, {
                    from: '<script type="text/javascript" src="js/api/dropzone.js"></script>',
                    to: ''
                }, {
                    from: '<link rel="stylesheet" href="css/dropzone.css">',
                    to: ''
                }, {
                    from: '<script type="text/javascript" src="js/fileHubManager.js"></script>',
                    to: ''
                }, {
                    from: 'js/api/jquery-2.1.1.js',
                    to: 'js/jquery-2.1.1.min.js'
                }, {
                    from: 'js/filehub.js',
                    to: 'js/filehub.min.js'
                }, {
                    from: 'css/filehub/filehub.css',
                    to: 'css/filehub/filehub.min.css'
                }]
            },

            errorScreen: {
                src: ['errorScreen.php'],
                dest: 'build/',
                replacements: [{
                    from: 'css/errorScreen/errorScreen.css',
                    to: 'css/errorScreen/errorScreen.min.css'
                }]
            },

            includes: {
                src: ['includes/top.php'],
                dest: 'build/includes/',
                replacements: [{
                    from: 'css/includes/includes.css',
                    to: 'css/includes/includes.min.css'
                }]
            },

            header: {
                src: ['includes/header.php'],
                dest: 'build/includes/',
                replacements: [{
                    from: 'css/includes/header.css',
                    to: 'css/includes/header.min.css'
                }, {
                    from: 'js/api/jquery-2.1.1.js',
                    to: 'js/jquery-2.1.1.min.js'
                }, {
                    from: 'js/includes/header.js',
                    to: 'js/includes/header.min.js'
                }]
            }
        },

        copy: {
            main: {
                files: [
                    // Folders
                    {expand: true, src: ['config/**'], dest: 'build/'},
                    {expand: true, src: ['favicon/**'], dest: 'build/'},
                    {expand: true, src: ['fonts/**'], dest: 'build/'},
                    {expand: true, src: ['php/**'], dest: 'build/'},
                    {expand: true, src: ['includes/**', '!includes/header.php', '!includes/top.php'], dest: 'build/'},

                    // Files
                    {expand: true, src: ['images/file_icons/LICENSE'], dest: 'build/'},
                    {expand: true, src: ['images/file_icons/README.md'], dest: 'build/'},
                    {expand: true, src: ['LICENSE'], dest: 'build/'},
                    {expand: true, src: ['README.md'], dest: 'build/'}
                ]
            }
        },

        mkdir: {
            upload_data: {
                options: {
                    mode: 0755,
                    create: ['build/upload_data']
{'fraction_non_alphanumeric': 0.14549325762952448, 'fraction_numerical': 0.017807600490354215, 'mean_word_length': 1.0, 'pattern_counts': {'":': 0, '<': 13, '<?xml version=': 0, '>': 13, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '6219117', 'n_tokens_mistral': 4623, 'n_tokens_neox': 4120, 'n_words': 589}