<commit_before>/* jshint node:true */

var gruntConnectConfig = {
    app: 'app',
    dist : 'dist',
    ngdocs: 'ngdocs',
    open: {
        hostname: 'localhost',
        port: 9000
    },
    liveReloadPage: require('connect-livereload')({ port: 35729 }),
    proxyRequest: require('grunt-connect-proxy/lib/utils').proxyRequest,
    modRewrite: require('connect-modrewrite'),
    mountFolder : function (connect, dir) {
        return connect.static(require('path').resolve(dir));
    }
};

module.exports = function(grunt) {

    grunt.initConfig({
        cmpnt: grunt.file.readJSON('bower.json'),
        dist: 'dist',
        banner: '/*! rxDataTable v<%= cmpnt.version %> by <NAME>(<EMAIL>) - ' +
                'https://github.com/nickburns2006/rxDataTable - New BSD License */\n',
        clean: {
            working: {
                src: ['src/scripts/rx-data-table.js', 'src/styles/rx-data-table.css']
            }
        },

        copy: {
            styles: {
                files: [
                    {
                        src: './src/styles/rx-data-table.css',
                        dest: '<%= dist %>/styles/rx-data-table.css'
                    },
                    {
                        src: './src/scripts/rx-data-table.js',
                        dest: '<%= dist %>/scripts/rx-data-table.js'
                    }
                ]
            }
        },

        uglify: {
            js: {
                src: ['<%=dist %>/scripts/rx-data-table.js'],
                dest: '<%= dist %>/scripts/rx-data-table.min.js',
                options: {
                    banner: '<%= banner %>',
                    sourceMap: function(fileName) {
                        return fileName.replace(/\.js$/, '.map');
                    }
                }
            }
        },

        concat: {
            js: {
                src: [
                    'src/scripts/rx-data-table.src.js',
                    'src/scripts/paginate.js',
                    'src/scripts/rx-data-table.tpls.js'
                ],
                dest: 'src/scripts/rx-data-table.js'
            }
        },

        less: {
            css: {
                files: {
                    'src/styles/rx-data-table.css': 'src/styles/rx-data-table.less'
                }
            }
        },

        cssmin: {
            css: {
                files: {
                    '<%= dist %>/styles/rx-data-table.min.css': '<%= dist %>/styles/rx-data-table.css'
                },
                options: {
                    banner: '<%= banner %>'
                }
            }
        },

        ngTemplateCache: {
            views: {
                files: {
                    'src/scripts/rx-data-table.tpls.js': 'src/templates/**/*.html'
                },
                options: {
                    trim: '',
                    module: 'rxDataTable'
                }
            }
        },

        karma: {
            options: {
                configFile: 'karma.conf.js',
            },
            dev: {
                singleRun: false
            },
            single: {
                singleRun: true
            },
            full: {
                singleRun: true,
                browsers: ['PhantomJS', 'Chrome', 'ChromeCanary', 'Firefox', 'Safari']
            }
        },

        shell: {
            protractor: {
                options: {
                    stdout: true
                },
                command: function (file) {
                    var localConfigFile = 'test/protractor.conf.local.js';
                    var defaultConfigFile = 'test/protractor.conf.js';
                    var configFile =  grunt.file.isFile(localConfigFile) ? localConfigFile : defaultConfigFile;
                    var cmd = 'protractor ' + configFile;

                    if (typeof file !== 'undefined' && file.length > 0) {
                        cmd += ' --specs ' + file;
                    }

                    return cmd;
                }
            },
            commitPush: {
                options: {
                    stdout: true
                },
                command: [
                    'git checkout master',
                    'git pull',
                    'git add .',
                    'git commit -m "Build: Committing auto-generated reports"',
                    'git push origin master'
                ].join('&&')
            },
            hooks: {
                command: [
                    'rm -f ./.git/hooks/pre-commit',
                    'cp git-hooks/pre-commit ./.git/hooks/',
                    'chmod u+x ./.git/hooks/pre-commit'
                ].join(' && ')
            }
        },

        jshint: {
            options: {
                jshintrc: '.jshintrc'
            },
            scripts: [
                'src/scripts/*.src.js',
                'src/scripts/**/*.src.js',
            ],
            specs: [
                'src/scripts/*.spec.js',
                'src/scripts/**/*.spec.js'
            ],
            misc: [ 'Gruntfile.js',
                    'test/**/*.js' ]
        },

        ngdocs: {
            options: {
                'dest': 'dist/ngdocs',
                'title': 'rxDataTable Developer Documentation',
                'html5Mode': false
            },
            guides: {
                src: ['guides/**/*.ngdoc'],
                title: 'rxDataTable Developer Guides'
            },
            all: ['src/scripts/**/*.js']
        },

        stubby: {
            stubsServer: {
                files: [{
                    src: [ 'test/api-mocks/requests/*.yaml',
                           'test/api-mocks/requests/**/*.yaml' ]
                }]<commit_msg>CHORE(grunt): test dir passes jshint<commit_after>/* jshint node:true */

var gruntConnectConfig = {
    app: 'app',
    dist : 'dist',
    ngdocs: 'ngdocs',
    open: {
        hostname: 'localhost',
        port: 9000
    },
    liveReloadPage: require('connect-livereload')({ port: 35729 }),
    proxyRequest: require('grunt-connect-proxy/lib/utils').proxyRequest,
    modRewrite: require('connect-modrewrite'),
    mountFolder : function (connect, dir) {
        return connect.static(require('path').resolve(dir));
    }
};

module.exports = function(grunt) {

    grunt.initConfig({
        cmpnt: grunt.file.readJSON('bower.json'),
        dist: 'dist',
        banner: '/*! rxDataTable v<%= cmpnt.version %> by <NAME>(<EMAIL>) - ' +
                'https://github.com/nickburns2006/rxDataTable - New BSD License */\n',
        clean: {
            working: {
                src: ['src/scripts/rx-data-table.js', 'src/styles/rx-data-table.css']
            }
        },

        copy: {
            styles: {
                files: [
                    {
                        src: './src/styles/rx-data-table.css',
                        dest: '<%= dist %>/styles/rx-data-table.css'
                    },
                    {
                        src: './src/scripts/rx-data-table.js',
                        dest: '<%= dist %>/scripts/rx-data-table.js'
                    }
                ]
            }
        },

        uglify: {
            js: {
                src: ['<%=dist %>/scripts/rx-data-table.js'],
                dest: '<%= dist %>/scripts/rx-data-table.min.js',
                options: {
                    banner: '<%= banner %>',
                    sourceMap: function(fileName) {
                        return fileName.replace(/\.js$/, '.map');
                    }
                }
            }
        },

        concat: {
            js: {
                src: [
                    'src/scripts/rx-data-table.src.js',
                    'src/scripts/paginate.js',
                    'src/scripts/rx-data-table.tpls.js'
                ],
                dest: 'src/scripts/rx-data-table.js'
            }
        },

        less: {
            css: {
                files: {
                    'src/styles/rx-data-table.css': 'src/styles/rx-data-table.less'
                }
            }
        },

        cssmin: {
            css: {
                files: {
                    '<%= dist %>/styles/rx-data-table.min.css': '<%= dist %>/styles/rx-data-table.css'
                },
                options: {
                    banner: '<%= banner %>'
                }
            }
        },

        ngTemplateCache: {
            views: {
                files: {
                    'src/scripts/rx-data-table.tpls.js': 'src/templates/**/*.html'
                },
                options: {
                    trim: '',
                    module: 'rxDataTable'
                }
            }
        },

        karma: {
            options: {
                configFile: 'karma.conf.js',
            },
            dev: {
                singleRun: false
            },
            single: {
                singleRun: true
            },
            full: {
                singleRun: true,
                browsers: ['PhantomJS', 'Chrome', 'ChromeCanary', 'Firefox', 'Safari']
            }
        },

        shell: {
            protractor: {
                options: {
                    stdout: true
                },
                command: function (file) {
                    var localConfigFile = 'test/protractor.conf.local.js';
                    var defaultConfigFile = 'test/protractor.conf.js';
                    var configFile =  grunt.file.isFile(localConfigFile) ? localConfigFile : defaultConfigFile;
                    var cmd = 'protractor ' + configFile;

                    if (typeof file !== 'undefined' && file.length > 0) {
                        cmd += ' --specs ' + file;
                    }

                    return cmd;
                }
            },
            commitPush: {
                options: {
                    stdout: true
                },
                command: [
                    'git checkout master',
                    'git pull',
                    'git add .',
                    'git commit -m "Build: Committing auto-generated reports"',
                    'git push origin master'
                ].join('&&')
            },
            hooks: {
                command: [
                    'rm -f ./.git/hooks/pre-commit',
                    'cp git-hooks/pre-commit ./.git/hooks/',
                    'chmod u+x ./.git/hooks/pre-commit'
                ].join(' && ')
            }
        },

        jshint: {
            options: {
                jshintrc: '.jshintrc'
            },
            scripts: [
                'src/scripts/*.src.js',
                'src/scripts/**/*.src.js',
            ],
            specs: [
                'src/scripts/*.spec.js',
                'src/scripts/**/*.spec.js'
            ],
            misc: [ 'Gruntfile.js',
                    'test/mock-app/src/*.js',
                    'test/mock-app/src/**/*.js' ]
        },

        ngdocs: {
            options: {
                'dest': 'dist/ngdocs',
                'title': 'rxDataTable Developer Documentation',
                'html5Mode': false
            },
            guides: {
                src: ['guides/**/*.ngdoc'],
                title: 'rxDataTable Developer Guides'
            },
            all: ['src/scripts/**/*.js']
        },

        stubby: {
            stubsServer: {
                files: [{
                    src: [ 'test/api-mocks/requests/*.yaml',
                           'test/api-mocks/requests/**/*.yaml' ]
                }]
{'fraction_non_alphanumeric': 0.13912368466448163, 'fraction_numerical': 0.0025875452820424355, 'mean_word_length': 0.9076999012833169, 'pattern_counts': {'":': 0, '<': 25, '<?xml version=': 0, '>': 27, 'https://': 2, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 4, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '7337199', 'n_tokens_mistral': 3295, 'n_tokens_neox': 3041, 'n_words': 487}