<commit_before>

module.exports = function(grunt) {


    grunt.initConfig({

        pkg: grunt.file.readJSON("package.json"),

        "emcc" : {
            options : {
                main : "src/native/main.c",
                flags : ["-Wall"],
                libs : ["src/native/libmypaint"],

                options : {
                    "EXPORTED_FUNCTIONS" : "\"['_init', '_stroke_to', '_reset_brush', '_set_brush_base_value', '_set_brush_mapping_n', '_set_brush_mapping_point', '_new_brush']\"",
                    "NO_EXIT_RUNTIME" : "1",
                    "RESERVED_FUNCTION_POINTERS" : "2",
                    "NO_FILESYSTEM" : "1",
                    "MODULARIZE" : "1",
                    "NO_BROWSER" : "1"
                }
            },

            debug : {
                optimization : "O0",
                bin : "bin/lib.debug.js",
            },

            release : {
                optimization : "O3",
                args : ["--memory-init-file 0"],
                bin : "bin/lib.release.js"
            }

        },

        clean : ["bin/*", "!bin/.gitkeep"],

        info : {
            options : {
                "version" : "<%= pkg.version %>",
                "version-file" : "src/native/libmypaint/SConscript",
                "version-var-name" : "brushlib_version",
                "export-name" : "INFO"
            },

            debug : {
                build : "DEBUG",
                dest : "bin/info.debug"
            },

            release : {
                build : "RELEASE",
                dest : "bin/info.release"
            }
        },

        concat : {
            "js-wrapper" : {
                src: ["src/js/common.js", "src/js/Bindings.js", "src/js/Painter.js", "src/js/_exports.js"],
                dest: "bin/wrapper.js"
            },

            "umd-debug" : {
                    src: ["src/_UMD/_header", "bin/info.debug", "bin/lib.debug.js", "bin/wrapper.js", "src/_UMD/_footer"],
                    dest: "bin/libmypaint.debug.js"
            },

            "umd-release" : {
                    src: ["src/_UMD/_header", "bin/info.release", "bin/lib.release.js", "bin/wrapper.js", "src/_UMD/_footer"],
                    dest: "bin/libmypaint.release.js"
            },

            "brushes" : {
                options : {
                    banner : "/* generated with 'grunt build-brushes' */ \n\n var brushes = [",
                    footer : "]",
                    separator : " , "
                },
                src : ["test/brushes/*/*.myb"],
                dest : "test/brushes/all-brushes.js"
            }
        }
    });


    // load
    grunt.loadNpmTasks('grunt-contrib-concat');
    grunt.loadNpmTasks('grunt-contrib-clean');

    grunt.task.loadTasks("./tasks");

    // register
    grunt.registerTask("debug", ["emcc:debug", "info:debug", "concat:js-wrapper", "concat:umd-debug"]);
    grunt.registerTask("release", ["emcc:release", "info:release", "concat:js-wrapper", "concat:umd-release"]);
    grunt.registerTask("build", ["clean", "debug"]);

    grunt.registerTask("build-brushes", ["concat:brushes"]);
};<commit_msg>cleanup build task naming & add testbed build tasks<commit_after>

module.exports = function(grunt) {


    grunt.initConfig({

        pkg: grunt.file.readJSON("package.json"),

        "emcc" : {
            options : {
                main : "src/native/main.c",
                flags : ["-Wall"],
                libs : ["src/native/libmypaint"],

                options : {
                    "EXPORTED_FUNCTIONS" : "\"['_init', '_stroke_to', '_reset_brush', '_set_brush_base_value', '_set_brush_mapping_n', '_set_brush_mapping_point', '_new_brush']\"",
                    "NO_EXIT_RUNTIME" : "1",
                    "RESERVED_FUNCTION_POINTERS" : "2",
                    "NO_FILESYSTEM" : "1",
                    "MODULARIZE" : "1",
                    "NO_BROWSER" : "1"
                }
            },

            debug : {
                optimization : "O0",
                bin : "bin/lib.debug.js"
            },

            release : {
                optimization : "O3",
                args : ["--memory-init-file 0"],
                bin : "bin/lib.release.js"
            }

        },

        clean : ["bin/*", "!bin/.gitkeep"],

        info : {
            options : {
                "version" : "<%= pkg.version %>",
                "version-file" : "src/native/libmypaint/SConscript",
                "version-var-name" : "brushlib_version",
                "export-name" : "INFO"
            },

            debug : {
                build : "DEBUG",
                dest : "bin/info.debug"
            },

            release : {
                build : "RELEASE",
                dest : "bin/info.release"
            }
        },

        "http-server" : {
            testbed : {
                root : "test/testbed/",
                port : 4242,
                host: "0.0.0.0",
                openBrowser : true
            }
        },

        copy : {
            "testbed-debug" : {
                files : [
                    {src : "bin/libmypaint.debug.js", dest : "test/testbed/bin/libmypaint.js"},
                    {src : "test/brushes/all-brushes.js", dest : "test/testbed/bin/brushes.js"}
                ]
            },

            "testbed-release" : {
                files : [
                    {src : "bin/libmypaint.release.js", dest : "test/testbed/bin/libmypaint.js"},
                    {src : "test/brushes/all-brushes.js", dest : "test/testbed/bin/brushes.js"}
                ]
            }
        },

        concat : {
            "js-wrapper" : {
                src: ["src/js/common.js", "src/js/Bindings.js", "src/js/Painter.js", "src/js/_exports.js"],
                dest: "bin/wrapper.js"
            },

            "umd-debug" : {
                    src: ["src/_UMD/_header", "bin/info.debug", "bin/lib.debug.js", "bin/wrapper.js", "src/_UMD/_footer"],
                    dest: "bin/libmypaint.debug.js"
            },

            "umd-release" : {
                    src: ["src/_UMD/_header", "bin/info.release", "bin/lib.release.js", "bin/wrapper.js", "src/_UMD/_footer"],
                    dest: "bin/libmypaint.release.js"
            },

            "brushes" : {
                options : {
                    banner : "/* generated with 'grunt build-brushes' */ \n\n var brushes = [",
                    footer : "]",
                    separator : " , "
                },
                src : ["test/brushes/*/*.myb"],
                dest : "test/brushes/all-brushes.js"
            }
        }
    });


    // load
    grunt.loadNpmTasks('grunt-contrib-concat');
    grunt.loadNpmTasks('grunt-contrib-clean');
    grunt.loadNpmTasks('grunt-contrib-copy');
    grunt.loadNpmTasks('grunt-http-server');


    grunt.task.loadTasks("./tasks");

    // build tasks
    grunt.registerTask("build:debug", ["emcc:debug", "info:debug", "concat:js-wrapper", "concat:umd-debug"]);
    grunt.registerTask("build:release", ["emcc:release", "info:release", "concat:js-wrapper", "concat:umd-release"]);
    grunt.registerTask("build:testbed-debug", ["build:debug", "concat:brushes", "copy:testbed-debug"]);
    grunt.registerTask("build:testbed-release", ["build:release", "concat:brushes", "copy:testbed-release"]);

    // testbed tasks
    grunt.registerTask("testbed:release", ["clean", "build:testbed-release", "http-server:testbed"]);
    grunt.registerTask("testbed:debug", ["clean", "build:testbed-debug", "http-server:testbed"]);

    // shortcuts
    grunt.registerTask("debug", ["clean", "build:debug"]);
    grunt.registerTask("release", ["clean", "build:release"]);
    grunt.registerTask("testbed", ["testbed:debug"]);



};
{'fraction_non_alphanumeric': 0.1667949704901206, 'fraction_numerical': 0.003079291762894534, 'mean_word_length': 1.4200558832660664, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 5, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 1, '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': '1114621', 'n_tokens_mistral': 2492, 'n_tokens_neox': 2321, 'n_words': 327}