<commit_before>module.exports = function(grunt) {
    //"use strict"; 
    //This is disabled because it's picking up octal literal notation that is quoted in a string.
    
    //usage: grunt [server | watch | (--minify &| --syncload)]
    //server: Start a testing server for the website.
    //watch: Automatically recompile part of the project when files are changed.
    //--minify: Compress the build. (Has no effect when server option in use.)

    
    // Compile a list of paths and output files for our modules for requirejs to compile.
    // TODO: Translate the command-line code to this.



    grunt.initConfig({

        requirejs: {
            compile: {
                options: {
                    mainConfigFile: "rjs_require_config.js",
                    name: "Readium",
                    optimize: grunt.option('minify')?undefined:"none",
                    out: "out/Readium" +
                        (grunt.option('syncload')?".syncload":"") +
                        (grunt.option('minify')?".min":"") + ".js",
                    include: grunt.option('syncload')?"define-sync":undefined,
                    almond: grunt.option('minify')
                }
            }
        }

    });
    

    require('load-grunt-tasks')(grunt);
    
    grunt.registerTask('default', ['requirejs']);

};<commit_msg>Fix build errors when using optional switches.<commit_after>module.exports = function(grunt) {
    //"use strict"; 
    //This is disabled because it's picking up octal literal notation that is quoted in a string.
    
    //usage: grunt [server | watch | (--minify &| --syncload)]
    //server: Start a testing server for the website.
    //watch: Automatically recompile part of the project when files are changed.
    //--minify: Compress the build. (Has no effect when server option in use.)

    
    // Compile a list of paths and output files for our modules for requirejs to compile.
    // TODO: Translate the command-line code to this.



    grunt.initConfig({

        requirejs: {
            compile: {
                options: {
                    mainConfigFile: "rjs_require_config.js",
                    name: "Readium",
                    optimize: grunt.option('minify')?"uglify":"none",
                    out: "out/Readium" +
                        (grunt.option('syncload')?".syncload":"") +
                        (grunt.option('minify')?".min":"") + ".js",
                    include: grunt.option('syncload')?"epub-modules/readium-js/src/define-sync":undefined,
                    almond: grunt.option('minify'),
                    wrap: grunt.option('syncload')?{
                      start: "(function (root, ReadiumModuleFactory) {\nroot.Readium = ReadiumModuleFactory();\n}(this, function () {",
                      end: "var Readium = require('Readium');\nreturn Readium;\n}));",
                    }:undefined
                }
            }
        }

    });
    

    require('load-grunt-tasks')(grunt);
    
    grunt.registerTask('default', ['requirejs']);

};
{'fraction_non_alphanumeric': 0.13101867016049787, 'fraction_numerical': 0.0, 'mean_word_length': 1.8173431734317342, 'pattern_counts': {'":': 7, '<': 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': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '1588573', 'n_tokens_mistral': 865, 'n_tokens_neox': 820, 'n_words': 223}