<commit_before>module.exports = function(grunt) {

	function esc(text) {
		return text.replace(/[-[\]{}()*+?.,\\^$|#\s]/g, "\\$&");
	}

	var pkg = grunt.file.readJSON('package.json');

	// Project configuration.
	grunt.initConfig({
		pkg: pkg,
		concat: {
			dist: {
				src: ['src/helpers.js', 'src/model.js', 'src/object-model.js', 'src/array-model.js', 'src/function-model.js'],
				dest: 'dist/object-model.js',
				options: {
					banner: ";(function(global){\n",
					footer: "\n\nglobal.Model = Model;\n})(this);"
				}
			},
			dist_umd: {
				src: ['src/helpers.js', 'src/model.js', 'src/object-model.js', 'src/array-model.js', 'src/function-model.js'],
				dest: 'dist/object-model.umd.js',
				options: {
					banner: "(function (globals, factory) {\n"
					+" if (typeof define === 'function' && define.amd) define(factory); // AMD\n"
					+" else if (typeof exports === 'object') module.exports = factory(); // Node\n"
					+" else globals['Model'] = factory(); // globals\n"
					+"}(this, function () {\n",
					footer: "\nreturn Model;\n}));"
				}
			}
		},
		uglify: {
			dist: {
				files: {
					'dist/object-model.min.js': ['dist/object-model.js']
				}
			}
		},
		watch: {
			scripts: {
				files: ['src/**.js','lib/**.js','test/**.js'],
				tasks: ['dist'],
				options: {
					spawn: false
				}
			}
		},
		qunit: {
			dist: {
				src: ['test/index.html']
			}
		},
		file_info: {
			dist: {
				src: ['dist/object-model.js','dist/object-model.min.js'],
				options: {
					inject: [
						{
							dest: 'index.html',
							text: 'all in <u>{{= sizeText(size(src[1])) }} minified ({{= sizeText(gzipSize(src[1])) }} gzipped)</u>'
						},
						{
							dest: 'index.html',
							text: 'minified file ({{= sizeText(size(src[1])) }})'
						}
					]
				}
			}
		},
		compress: {
			source_files: {
				options: {
					archive: 'dist/object-model-<%= pkg.version %>.zip'
				},
				files: [{
					src:['dist/*.js','src/**','lib/**','test/**','Gruntfile.js','package.json']
				}]
			}
		},
		"regex-replace": {
			site: { //specify a target with any name
				src: ['index.html'],
				actions: [
					{
						name: 'version number',
						search: esc('Current version: v')+'\\d+\\.\\d+\\.\\d+',<commit_msg>fixed grunt task text replace<commit_after>module.exports = function(grunt) {

	function esc(text) {
		return text.replace(/[-[\]{}()*+?.,\\^$|#\s]/g, "\\$&");
	}

	var pkg = grunt.file.readJSON('package.json');

	// Project configuration.
	grunt.initConfig({
		pkg: pkg,
		concat: {
			dist: {
				src: ['src/helpers.js', 'src/model.js', 'src/object-model.js', 'src/array-model.js', 'src/function-model.js'],
				dest: 'dist/object-model.js',
				options: {
					banner: ";(function(global){\n",
					footer: "\n\nglobal.Model = Model;\n})(this);"
				}
			},
			dist_umd: {
				src: ['src/helpers.js', 'src/model.js', 'src/object-model.js', 'src/array-model.js', 'src/function-model.js'],
				dest: 'dist/object-model.umd.js',
				options: {
					banner: "(function (globals, factory) {\n"
					+" if (typeof define === 'function' && define.amd) define(factory); // AMD\n"
					+" else if (typeof exports === 'object') module.exports = factory(); // Node\n"
					+" else globals['Model'] = factory(); // globals\n"
					+"}(this, function () {\n",
					footer: "\nreturn Model;\n}));"
				}
			}
		},
		uglify: {
			dist: {
				files: {
					'dist/object-model.min.js': ['dist/object-model.js']
				}
			}
		},
		watch: {
			scripts: {
				files: ['src/**.js','lib/**.js','test/**.js'],
				tasks: ['dist'],
				options: {
					spawn: false
				}
			}
		},
		qunit: {
			dist: {
				src: ['test/index.html']
			}
		},
		file_info: {
			dist: {
				src: ['dist/object-model.js','dist/object-model.min.js'],
				options: {
					inject: [
						{
							dest: 'index.html',
							text: 'all in <strong>{{= sizeText(size(src[1])) }} minified ({{= sizeText(gzipSize(src[1])) }} gzipped)</strong>'
						},
						{
							dest: 'index.html',
							text: 'minified file ({{= sizeText(size(src[1])) }})'
						}
					]
				}
			}
		},
		compress: {
			source_files: {
				options: {
					archive: 'dist/object-model-<%= pkg.version %>.zip'
				},
				files: [{
					src:['dist/*.js','src/**','lib/**','test/**','Gruntfile.js','package.json']
				}]
			}
		},
		"regex-replace": {
			site: { //specify a target with any name
				src: ['index.html'],
				actions: [
					{
						name: 'version number',
						search: esc('Current version: v')+'\\d+\\.\\d+\\.\\d+',
{'fraction_non_alphanumeric': 0.24276169265033407, 'fraction_numerical': 0.0013363028953229399, 'mean_word_length': 2.4204112718964206, 'pattern_counts': {'":': 2, '<': 9, '<?xml version=': 0, '>': 9, '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': '6017238', 'n_tokens_mistral': 2166, 'n_tokens_neox': 1685, 'n_words': 277}