<commit_before>/*********************************
/* Excalibur.js Grunt Build File
/*********************************/

/*global module:false*/
module.exports = function (grunt) {

   //
   // Project configuration
   //
   grunt.initConfig({
      pkg: grunt.file.readJSON('package.json'),

      //
      // Configure jasmine-node to run Jasmine specs
      //
      jasmine_node: {
         options: {
            specNameMatcher: "Spec", // load only specs containing specNameMatcher
            specFolders: ["./src/spec"],
            forceExit: true,
            showColors: true,
            junitreport: {
               report: false,
               savePath: "./dist/reports/jasmine/",
               useDotNotation: true,
               consolidate: true
            }
         },
         src: ["**/*.js"]
      },

      //
      // Concatenate build files
      // Add banner to files
      //
      concat: {
         main: {
            src: ['dist/<%= pkg.name %>-<%= pkg.version %>.js', 'src/engine/Exports.js'],
            dest: 'dist/<%= pkg.name %>-<%= pkg.version %>.js'
         },
         minified: {
            src: ['dist/<%= pkg.name %>-<%= pkg.version %>.min.js', 'src/engine/Exports.js'],
            dest: 'dist/<%= pkg.name %>-<%= pkg.version %>.min.js'
         },
         options: {
            separator: '\n;\n',
            banner: '/*! <%= pkg.title || pkg.name %> - v<%= pkg.version %> - ' +
                    '<%= grunt.template.today("yyyy-mm-dd") %>\n' +
                    '<%= pkg.homepage ? "* " + pkg.homepage + "\\n" : "" %>' +
                    '* Copyright (c) <%= grunt.template.today("yyyy") %> <%= pkg.author.name %>;' +
                    ' Licensed <%= pkg.license.type%>*/\n'
         }
      },

      //
      // Minify files
      //
      minified: {
         files: {
            src: 'dist/<%= pkg.name %>-<%= pkg.version %>.js',
            dest: 'dist/<%= pkg.name %>-<%= pkg.version %>'
         },
         options: {
            sourcemap: false,
            allinone: true,
            dest_filename: '.min.js'
         }
      },

      //
      // Watch files
      //
      watch: {
         scripts: {
            files: ['src/engine/*.ts', 'src/engine/*/*.ts', 'src/spec/*.ts'],
            tasks: ['tslint:src', 'shell:specs', 'jasmine_node'],
            options: {
               interrupt: true
            }
         }
      },

      //
      // Shell Commands
      //
      shell: {

         //
         // Execute TypeScript compiler against Excalibur core
         //
         tsc: {
            command: 'tsc --sourcemap --declaration "./src/engine/Engine.ts" --out "./dist/<%= pkg.name %>-<%= pkg.version %>.js"',               
            options: {
               stdout: true,
               failOnError: true
            }
         },

         //
         // Package up Nuget (Windows only)
         //
         nuget: {
            command: 'src\\tools\\nuget pack Excalibur.nuspec -version <%= pkg.version %> -OutputDirectory ./dist',
            options: {
               stdout: true
            }
         },         

         //
         // TypeScript Compile Jasmine specs
         //
         specs: {
            command: function () {
            	var files = grunt.file.expand("./src/spec/*.ts");

            	return 'tsc ' + files.join(' ') + ' --out ./src/spec/TestsSpec.js'
            },
            options: {
               stdout: true,
               failOnError: true
            }
         },

         //
         // TypeScript Compile sample game
         //
         sample: {
            command: 'tsc ./sandbox/web/src/game.ts',
            options: {
               stdout: true,
               failOnError: true
            }
         }

      },

      //
      // Copy Files for sample game
      //
      copy: {
         main: {
            files: [
               {src: './dist/<%= pkg.name %>-<%= pkg.version %>.js', dest: './dist/<%= pkg.name %>.js'},
               {src: './dist/<%= pkg.name %>-<%= pkg.version %>.js', dest: './sandbox/web/<%= pkg.name %>.js'},
               {src: './dist/<%= pkg.name %>-<%= pkg.version %>.min.js', dest: './dist/<%= pkg.name %>.min.js'},
               {src: './dist/<%= pkg.name %>-<%= pkg.version %>.d.ts', dest: './dist/<%= pkg.name %>.d.ts'}
            ]
         }
      },

      //
      // TS Lint configuration
      //
      tslint: {
         options: {
            formatter: 'prose',
            rulesDirectory: './tslint/rules/',
            configuration: grunt.file.readJSON('./tslint/tslint.json')            
         },
         src: [
            "src/engine/*.ts",
            "src/engine/Actions/*.ts",
            "src/engine/Collision/*.ts",
            "src/engine/Drawing/*.ts",
            "src/engine/Input/*.ts",
            "src/engine/Interfaces/*.ts",
            "src/engine/PostProcessing/*.ts",
            "src/engine/Traits/*.ts",
            "src/engine/Util/*.ts",
            "src/spec/UIActorSpec.ts",
            "src/spec/TimerSpec.ts", 
            "src/spec/PromiseSpec.ts", 
            "src/spec/MathSpec.ts", 
            "src/spec/LabelSpec.ts", 
            "src/spec/LogSpec.ts", 
            "src/spec/EventSpec.ts",
            "src/spec/ColorSpec.ts", 
            "src/spec/GroupSpec.ts", 
            "src/spec/CollectionSpec.ts", 
            "src/spec/BoundingBoxSpec.ts", 
            "src/spec/CameraSpec.ts", 
            "src/spec/ClassSpec.ts", 
            "src/spec/CollisionGroupSpec.ts", 
            "src/spec/CollisionSpec.ts", 
            "src/spec/SortedListSpec.ts", 
            "src/spec/ActorSpec.ts"
         ]
      },
      
      coveralls: {
         main: {
            src: './coverage/lcov.info',
            options: {
               force: true<commit_msg>excluding d.ts files from lint check<commit_after>/*********************************
/* Excalibur.js Grunt Build File
/*********************************/

/*global module:false*/
module.exports = function (grunt) {

   //
   // Project configuration
   //
   grunt.initConfig({
      pkg: grunt.file.readJSON('package.json'),

      //
      // Configure jasmine-node to run Jasmine specs
      //
      jasmine_node: {
         options: {
            specNameMatcher: "Spec", // load only specs containing specNameMatcher
            specFolders: ["./src/spec"],
            forceExit: true,
            showColors: true,
            junitreport: {
               report: false,
               savePath: "./dist/reports/jasmine/",
               useDotNotation: true,
               consolidate: true
            }
         },
         src: ["**/*.js"]
      },

      //
      // Concatenate build files
      // Add banner to files
      //
      concat: {
         main: {
            src: ['dist/<%= pkg.name %>-<%= pkg.version %>.js', 'src/engine/Exports.js'],
            dest: 'dist/<%= pkg.name %>-<%= pkg.version %>.js'
         },
         minified: {
            src: ['dist/<%= pkg.name %>-<%= pkg.version %>.min.js', 'src/engine/Exports.js'],
            dest: 'dist/<%= pkg.name %>-<%= pkg.version %>.min.js'
         },
         options: {
            separator: '\n;\n',
            banner: '/*! <%= pkg.title || pkg.name %> - v<%= pkg.version %> - ' +
                    '<%= grunt.template.today("yyyy-mm-dd") %>\n' +
                    '<%= pkg.homepage ? "* " + pkg.homepage + "\\n" : "" %>' +
                    '* Copyright (c) <%= grunt.template.today("yyyy") %> <%= pkg.author.name %>;' +
                    ' Licensed <%= pkg.license.type%>*/\n'
         }
      },

      //
      // Minify files
      //
      minified: {
         files: {
            src: 'dist/<%= pkg.name %>-<%= pkg.version %>.js',
            dest: 'dist/<%= pkg.name %>-<%= pkg.version %>'
         },
         options: {
            sourcemap: false,
            allinone: true,
            dest_filename: '.min.js'
         }
      },

      //
      // Watch files
      //
      watch: {
         scripts: {
            files: ['src/engine/*.ts', 'src/engine/*/*.ts', 'src/spec/*.ts'],
            tasks: ['tslint:src', 'shell:specs', 'jasmine_node'],
            options: {
               interrupt: true
            }
         }
      },

      //
      // Shell Commands
      //
      shell: {

         //
         // Execute TypeScript compiler against Excalibur core
         //
         tsc: {
            command: 'tsc --sourcemap --declaration "./src/engine/Engine.ts" --out "./dist/<%= pkg.name %>-<%= pkg.version %>.js"',               
            options: {
               stdout: true,
               failOnError: true
            }
         },

         //
         // Package up Nuget (Windows only)
         //
         nuget: {
            command: 'src\\tools\\nuget pack Excalibur.nuspec -version <%= pkg.version %> -OutputDirectory ./dist',
            options: {
               stdout: true
            }
         },         

         //
         // TypeScript Compile Jasmine specs
         //
         specs: {
            command: function () {
            	var files = grunt.file.expand("./src/spec/*.ts");

            	return 'tsc ' + files.join(' ') + ' --out ./src/spec/TestsSpec.js'
            },
            options: {
               stdout: true,
               failOnError: true
            }
         },

         //
         // TypeScript Compile sample game
         //
         sample: {
            command: 'tsc ./sandbox/web/src/game.ts',
            options: {
               stdout: true,
               failOnError: true
            }
         }

      },

      //
      // Copy Files for sample game
      //
      copy: {
         main: {
            files: [
               {src: './dist/<%= pkg.name %>-<%= pkg.version %>.js', dest: './dist/<%= pkg.name %>.js'},
               {src: './dist/<%= pkg.name %>-<%= pkg.version %>.js', dest: './sandbox/web/<%= pkg.name %>.js'},
               {src: './dist/<%= pkg.name %>-<%= pkg.version %>.min.js', dest: './dist/<%= pkg.name %>.min.js'},
               {src: './dist/<%= pkg.name %>-<%= pkg.version %>.d.ts', dest: './dist/<%= pkg.name %>.d.ts'}
            ]
         }
      },

      //
      // TS Lint configuration
      //
      tslint: {
         options: {
            formatter: 'prose',
            rulesDirectory: './tslint/rules/',
            configuration: grunt.file.readJSON('./tslint/tslint.json')            
         },
         src: [
            "src/engine/*.ts",
            "src/engine/Actions/*.ts",
            "src/engine/Collision/*.ts",
            "src/engine/Drawing/*.ts",
            "src/engine/Input/*.ts",
            "src/engine/Interfaces/*.ts",
            "src/engine/PostProcessing/*.ts",
            "src/engine/Traits/*.ts",
            "src/engine/Util/*.ts",
            "src/spec/UIActorSpec.ts",
            "src/spec/TimerSpec.ts", 
            "src/spec/PromiseSpec.ts", 
            "src/spec/MathSpec.ts", 
            "src/spec/LabelSpec.ts", 
            "src/spec/LogSpec.ts", 
            "src/spec/EventSpec.ts",
            "src/spec/ColorSpec.ts", 
            "src/spec/GroupSpec.ts", 
            "src/spec/CollectionSpec.ts", 
            "src/spec/BoundingBoxSpec.ts", 
            "src/spec/CameraSpec.ts", 
            "src/spec/ClassSpec.ts", 
            "src/spec/CollisionGroupSpec.ts", 
            "src/spec/CollisionSpec.ts", 
            "src/spec/SortedListSpec.ts", 
            "src/spec/ActorSpec.ts",
            
            // exclusions
            "!src/spec/jasmine.d.ts"
            "!src/spec/require.d.ts"
         ]
      },
      
      coveralls: {
         main: {
            src: './coverage/lcov.info',
            options: {
               force: true
{'fraction_non_alphanumeric': 0.18442727349919336, 'fraction_numerical': 0.0, 'mean_word_length': 1.1698599852616065, 'pattern_counts': {'":': 0, '<': 71, '<?xml version=': 0, '>': 71, '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': '856081', 'n_tokens_mistral': 3770, 'n_tokens_neox': 3473, 'n_words': 601}