<commit_before>module.exports = (grunt) ->
    @loadNpmTasks('grunt-contrib-clean')
    @loadNpmTasks('grunt-contrib-concat')
    @loadNpmTasks('grunt-contrib-connect')
    @loadNpmTasks('grunt-contrib-jshint')
    @loadNpmTasks('grunt-contrib-uglify')
    @loadNpmTasks('grunt-contrib-watch')
    @loadNpmTasks('grunt-karma')
    @loadNpmTasks('grunt-release')
    @loadNpmTasks('grunt-ngmin')

    @initConfig
        jshint:
            all: [ 'src/*.js', '!src/plural.js' ]
            options:
                jshintrc: '.jshintrc'

        concat:
            dist:
                files:
                    'dist/angular-gettext.js': ['src/index.js', 'dist/angular-gettext.js', 'src/*.js']

        uglify:
            dist:
                files:
                    'dist/angular-gettext.min.js': 'dist/angular-gettext.js'

        clean:
            all: ['dist']

        watch:
            options:
                livereload: true
            all:
                files: ['src/**.js', 'test/*/*']
                tasks: ['build', 'karma:unit:run', 'karma:e2e:run']
            unit:
                files: ['src/**.js', 'test/unit/*']
                tasks: ['build', 'karma:unit:run']
            e2e:
                files: ['src/**.js', 'test/{e2e,fixtures}/*']
                tasks: ['build', 'karma:e2e:run']

        ngmin:
            dist:
                files:
                    'dist/angular-gettext.js': 'dist/angular-gettext.js'

        connect:
            e2e:
                options:
                    port: 9000
                    hostname: '0.0.0.0'
                    middleware: (connect) ->
                        return [
                            connect.static(__dirname)
                        ]

        karma:
            unit:
                configFile: 'test/configs/unit.conf.coffee'
                browsers: ['Chrome']
                background: true
            unitci_firefox:
                configFile: 'test/configs/unit.conf.coffee'
                browsers: ['Firefox']
                singleRun: true
                reporters: ['dots', 'junit']
                junitReporter:
                    outputFile: 'unit-results.xml'
            e2e:
                configFile: 'test/configs/e2e.conf.coffee'
                browsers: ['Chrome']
                background: true
            e2eci_firefox:
                configFile: 'test/configs/e2e.conf.coffee'
                browsers: ['Firefox']
                singleRun: true
                reporters: ['dots', 'junit']
                junitReporter:
                    outputFile: 'e2e-results.xml'

    @registerTask 'default', ['test']
    @registerTask 'build', ['clean', 'jshint', 'concat', 'ngmin', 'uglify']
    @registerTask 'package', ['build', 'release']
    @registerTask 'test', ['build', 'connect:e2e', 'karma:unit', 'karma:e2e', 'watch:all']
    @registerTask 'test_unit', ['build', 'karma:unit', 'watch:unit']
    @registerTask 'test_e2e', ['build', 'connect:e2e', 'karma:e2e', 'watch:e2e']
    @registerTask 'ci', ['build', 'karma:unitci_firefox', 'connect:e2e', 'karma:e2eci_firefox']<commit_msg>Use PhantomJS.<commit_after>module.exports = (grunt) ->
    @loadNpmTasks('grunt-contrib-clean')
    @loadNpmTasks('grunt-contrib-concat')
    @loadNpmTasks('grunt-contrib-connect')
    @loadNpmTasks('grunt-contrib-jshint')
    @loadNpmTasks('grunt-contrib-uglify')
    @loadNpmTasks('grunt-contrib-watch')
    @loadNpmTasks('grunt-karma')
    @loadNpmTasks('grunt-release')
    @loadNpmTasks('grunt-ngmin')

    @initConfig
        jshint:
            all: [ 'src/*.js', '!src/plural.js' ]
            options:
                jshintrc: '.jshintrc'

        concat:
            dist:
                files:
                    'dist/angular-gettext.js': ['src/index.js', 'dist/angular-gettext.js', 'src/*.js']

        uglify:
            dist:
                files:
                    'dist/angular-gettext.min.js': 'dist/angular-gettext.js'

        clean:
            all: ['dist']

        watch:
            options:
                livereload: true
            all:
                files: ['src/**.js', 'test/*/*']
                tasks: ['build', 'karma:unit:run', 'karma:e2e:run']
            unit:
                files: ['src/**.js', 'test/unit/*']
                tasks: ['build', 'karma:unit:run']
            e2e:
                files: ['src/**.js', 'test/{e2e,fixtures}/*']
                tasks: ['build', 'karma:e2e:run']

        ngmin:
            dist:
                files:
                    'dist/angular-gettext.js': 'dist/angular-gettext.js'

        connect:
            e2e:
                options:
                    port: 9000
                    hostname: '0.0.0.0'
                    middleware: (connect) ->
                        return [
                            connect.static(__dirname)
                        ]

        karma:
            unit:
                configFile: 'test/configs/unit.conf.coffee'
                browsers: ['PhantomJS']
                background: true
            unitci_firefox:
                configFile: 'test/configs/unit.conf.coffee'
                browsers: ['Firefox', 'PhantomJS']
                singleRun: true
                reporters: ['dots', 'junit']
                junitReporter:
                    outputFile: 'unit-results.xml'
            e2e:
                configFile: 'test/configs/e2e.conf.coffee'
                browsers: ['PhantomJS']
                background: true
            e2eci_firefox:
                configFile: 'test/configs/e2e.conf.coffee'
                browsers: ['Firefox', 'PhantomJS']
                singleRun: true
                reporters: ['dots', 'junit']
                junitReporter:
                    outputFile: 'e2e-results.xml'

    @registerTask 'default', ['test']
    @registerTask 'build', ['clean', 'jshint', 'concat', 'ngmin', 'uglify']
    @registerTask 'package', ['build', 'release']
    @registerTask 'test', ['build', 'connect:e2e', 'karma:unit', 'karma:e2e', 'watch:all']
    @registerTask 'test_unit', ['build', 'karma:unit', 'watch:unit']
    @registerTask 'test_e2e', ['build', 'connect:e2e', 'karma:e2e', 'watch:e2e']
    @registerTask 'ci', ['build', 'karma:unitci_firefox', 'connect:e2e', 'karma:e2eci_firefox']
{'fraction_non_alphanumeric': 0.14883499762244412, 'fraction_numerical': 0.008242193691551752, 'mean_word_length': 1.5229908036785287, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 7, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 4}, 'pii_count': 2, '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': '5955827', 'n_tokens_mistral': 2029, 'n_tokens_neox': 1917, 'n_words': 312}