<commit_before>'use strict';

module.exports = function(grunt) {

    grunt.loadNpmTasks('grunt-contrib-watch');
    grunt.loadNpmTasks('grunt-contrib-jshint');
    grunt.loadNpmTasks('grunt-contrib-jasmine');
    grunt.loadNpmTasks('grunt-es6-module-transpiler');

    grunt.initConfig({
        regenerator: {
            jspipe: {
                options: {
                    input: './src/jspipe.js',
                    out: './tmp/jspipe.js',
                    regeneratorOptions: {
                        includeRuntime: false
                    }
                }
            }
        },

        jshint: {
            options: {
                esnext: true                
            },

            all: ['src/**/*.js']
        },

        
        transpile: {

            commonjs: {
                type: 'cjs',
                files: [{ src: ['tmp/jspipe.js'],
                          dest: 'dist-es5/commonjs/jspipe.js' },
                        
                        { src: ['src/jspipe.js'],
                          dest: 'dist-es6/commonjs/jspipe.js' }]
            },

            amd: {
                type: 'amd',
                files: [
                    {
                        expand: true,
                        cwd: 'tmp/',
                        src: ['**/*.js'],
                        dest: 'dist-es5/amd/'
                    },
                    {
                        expand: true,
                        cwd: 'src/',
                        src: ['**/*.js'],
                        dest: 'dist-es6/amd/'
                    }
                ]
            }
        },

        browser: {
            es5: {
                options: {
                    src: ['tmp/jspipe.js'],
                    dest: 'dist-es5/jspipe.js',
                    namespace: 'JSPipe'
                }
            },

            es6: {
                options: {
                    src: ['src/jspipe.js'],
                    dest: 'dist-es6/jspipe.js',
                    namespace: 'JSPipe'
                }
            }
        },

        createGeneratorRuntime: {
            options: {
                dest: 'dist-es5/generator-runtime.js'
            }
        },
        
        jasmine: {
            src: 'dist-es5/**/*.js',
            options: {
                specs: 'spec/*-spec.js'
            }
        },

        watch: {
            files: ['./src/**/*.js'],
            tasks: ['build']
        }
    });

    // Registers and loads tasks
    grunt.loadTasks('tasks');
    
    grunt.registerTask('default', ['jshint',
                                   'ensureBuildDirectories',<commit_msg>only run jasmine tests for module pattern output<commit_after>'use strict';

module.exports = function(grunt) {

    grunt.loadNpmTasks('grunt-contrib-watch');
    grunt.loadNpmTasks('grunt-contrib-jshint');
    grunt.loadNpmTasks('grunt-contrib-jasmine');
    grunt.loadNpmTasks('grunt-es6-module-transpiler');

    grunt.initConfig({
        regenerator: {
            jspipe: {
                options: {
                    input: './src/jspipe.js',
                    out: './tmp/jspipe.js',
                    regeneratorOptions: {
                        includeRuntime: false
                    }
                }
            }
        },

        jshint: {
            options: {
                esnext: true                
            },

            all: ['src/**/*.js']
        },

        
        transpile: {

            commonjs: {
                type: 'cjs',
                files: [{ src: ['tmp/jspipe.js'],
                          dest: 'dist-es5/commonjs/jspipe.js' },
                        
                        { src: ['src/jspipe.js'],
                          dest: 'dist-es6/commonjs/jspipe.js' }]
            },

            amd: {
                type: 'amd',
                files: [
                    {
                        expand: true,
                        cwd: 'tmp/',
                        src: ['**/*.js'],
                        dest: 'dist-es5/amd/'
                    },
                    {
                        expand: true,
                        cwd: 'src/',
                        src: ['**/*.js'],
                        dest: 'dist-es6/amd/'
                    }
                ]
            }
        },

        browser: {
            es5: {
                options: {
                    src: ['tmp/jspipe.js'],
                    dest: 'dist-es5/jspipe.js',
                    namespace: 'JSPipe'
                }
            },

            es6: {
                options: {
                    src: ['src/jspipe.js'],
                    dest: 'dist-es6/jspipe.js',
                    namespace: 'JSPipe'
                }
            }
        },

        createGeneratorRuntime: {
            options: {
                dest: 'dist-es5/generator-runtime.js'
            }
        },
        
        jasmine: {
            src: 'dist-es5/jspipe.js',
            options: {
                specs: 'spec/*-spec.js'
            }
        },

        watch: {
            files: ['./src/**/*.js'],
            tasks: ['build']
        }
    });

    // Registers and loads tasks
    grunt.loadTasks('tasks');
    
    grunt.registerTask('default', ['jshint',
                                   'ensureBuildDirectories',
{'fraction_non_alphanumeric': 0.12832434442997953, 'fraction_numerical': 0.004091500836897899, 'mean_word_length': 0.7592410860320575, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 2, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '5468877', 'n_tokens_mistral': 1495, 'n_tokens_neox': 1381, 'n_words': 202}