<commit_before>/**
 * When using enketo-core in your own app, you'd want to replace
 * this build file with one of your own in your project root.
 */

/*jshint node:true*/
"use strict";

module.exports = function( grunt ) {
    var js;

    // Project configuration.
    grunt.initConfig( {
        pkg: grunt.file.readJSON( 'package.json' ),
        connect: {
            server: {
                options: {
                    port: 8080
                }
            },
            test: {
                options: {
                    port: 8000
                }
            }
        },
        jsbeautifier: {
            test: {
                src: [ "*.js", "src/js/*.js", "src/widget/*/*.js" ],
                options: {
                    config: "./.jsbeautifyrc",
                    mode: "VERIFY_ONLY"
                }
            },
            fix: {
                src: [ "*.js", "src/js/*.js", "src/widget/*/*.js" ],
                options: {
                    config: "./.jsbeautifyrc"
                }
            }
        },
        jshint: {
            options: {
                jshintrc: '.jshintrc'
            },
            all: [ '*.js', 'src/js/**/*.js', '!src/js/extern.js' ]
        },
        watch: {
            sass: {
                files: [ 'config.json', 'grid/sass/**/*.scss', 'src/sass/**/*.scss', 'src/widget/**/*.scss' ],
                tasks: [ 'style' ],
                options: {
                    spawn: false
                }
            },
            js: {
                files: [ '*.js', 'src/**/*.js' ],
                tasks: [ 'modernizr' ],
                options: {
                    spawn: false
                }
            }
        },
        jasmine: {
            test: {
                src: 'src/js/**/*.js',
                options: {
                    keepRunner: true,
                    specs: 'test/spec/*.js',
                    helpers: [ 'test/util/*.js', 'test/mock/*.js' ],
                    host: 'http://127.0.0.1:8000/',
                    template: require( 'grunt-template-jasmine-requirejs' ),
                    templateOptions: {
                        requireConfig: {
                            baseUrl: 'lib',
                            paths: {
                                'enketo-js': '../src/js',
                                'enketo-widget': '../src/widget',
                                'enketo-config': '../config.json',
                                text: 'text/text',
                                xpath: 'xpath/build/xpathjs_javarosa',
                                'jquery.xpath': 'jquery-xpath/jquery.xpath',
                                'jquery.touchswipe': 'jquery-touchswipe/jquery.touchSwipe',
                                'leaflet': 'leaflet/leaflet'
                            },
                            shim: {
                                'xpath': {
                                    exports: 'XPathJS'
                                },
                                'bootstrap': {
                                    deps: [ 'jquery' ],
                                    exports: 'jQuery.fn.bootstrap'
                                },
                                'widget/date/bootstrap3-datepicker/js/bootstrap-datepicker': {
                                    deps: [ 'jquery' ],
                                    exports: 'jQuery.fn.datepicker'<commit_msg>fix in testrunner<commit_after>/**
 * When using enketo-core in your own app, you'd want to replace
 * this build file with one of your own in your project root.
 */

/*jshint node:true*/
"use strict";

module.exports = function( grunt ) {
    var js;

    // Project configuration.
    grunt.initConfig( {
        pkg: grunt.file.readJSON( 'package.json' ),
        connect: {
            server: {
                options: {
                    port: 8080
                }
            },
            test: {
                options: {
                    port: 8000
                }
            }
        },
        jsbeautifier: {
            test: {
                src: [ "*.js", "src/js/*.js", "src/widget/*/*.js" ],
                options: {
                    config: "./.jsbeautifyrc",
                    mode: "VERIFY_ONLY"
                }
            },
            fix: {
                src: [ "*.js", "src/js/*.js", "src/widget/*/*.js" ],
                options: {
                    config: "./.jsbeautifyrc"
                }
            }
        },
        jshint: {
            options: {
                jshintrc: '.jshintrc'
            },
            all: [ '*.js', 'src/js/**/*.js', '!src/js/extern.js' ]
        },
        watch: {
            sass: {
                files: [ 'config.json', 'grid/sass/**/*.scss', 'src/sass/**/*.scss', 'src/widget/**/*.scss' ],
                tasks: [ 'style' ],
                options: {
                    spawn: false
                }
            },
            js: {
                files: [ '*.js', 'src/**/*.js' ],
                tasks: [ 'modernizr' ],
                options: {
                    spawn: false
                }
            }
        },
        jasmine: {
            test: {
                src: 'src/js/**/*.js',
                options: {
                    keepRunner: true,
                    specs: 'test/spec/*.js',
                    helpers: [ 'test/util/*.js', 'test/mock/*.js' ],
                    host: 'http://127.0.0.1:8000/',
                    template: require( 'grunt-template-jasmine-requirejs' ),
                    templateOptions: {
                        requireConfig: {
                            baseUrl: 'lib',
                            paths: {
                                'enketo-js': '../src/js',
                                'enketo-widget': '../src/widget',
                                'enketo-config': '../config.json',
                                text: 'text/text',
                                xpath: 'xpath/build/xpathjs_javarosa',
                                'jquery.xpath': 'jquery-xpath/jquery.xpath',
                                'jquery.touchswipe': 'jquery-touchswipe/jquery.touchSwipe',
                                'leaflet': 'leaflet/leaflet',
                                'bootstrap-slider': 'bootstrap-slider/js/bootstrap-slider'
                            },
                            shim: {
                                'xpath': {
                                    exports: 'XPathJS'
                                },
                                'bootstrap': {
                                    deps: [ 'jquery' ],
                                    exports: 'jQuery.fn.bootstrap'
                                },
                                'widget/date/bootstrap3-datepicker/js/bootstrap-datepicker': {
                                    deps: [ 'jquery' ],
                                    exports: 'jQuery.fn.datepicker'
{'fraction_non_alphanumeric': 0.13326653306613226, 'fraction_numerical': 0.005439450329229888, 'mean_word_length': 0.7608366935483871, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 2, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 10, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '6382523', 'n_tokens_mistral': 1896, 'n_tokens_neox': 1748, 'n_words': 299}