<commit_before>module.exports = function(grunt) {
	
	grunt.initConfig({
		clean: {
			tmp: {
				src: [ 'build/tmp/**/*', 'build/tmp/' ]
			},
			release: {
				src: [ 'build/release/**/*', 'build/release/' ]
			}
		},
		copy: {
			tmpsrc: {
				expand: true,
				cwd: 'src/',
				src: '**/*',
				dest: 'build/tmp/'
			},
			statics: {
				expand: true,
				cwd: 'build/tmp/',
				src: [
					'assets/img/**',
					'assets/snd/**',
					'assets/js/Chart.min.js',
					'assets/js/Dexie.min.js',
					'assets/js/KanColleHelpers.js',
					'assets/js/FileSaver.min.js'
				],
				dest: 'build/release/'
			},
			processed: {
				expand: true,
				cwd: 'build/tmp/',
				src: [
					'assets/css/keys.css',
					'library/helpers/*.js',
					'library/injections/*.js',
					'library/modules/*.js',
					'pages/**/*',
					'!pages/strategy/tabs/**/*.js',
					'manifest.json',
					'data/**/*.json'
				],
				dest: 'build/release/'
			}
		},
		removelogging: {
			'build/tmp': {
				src: "build/tmp/**/*.js"
			}
		},
		jshint: {
			all : {
				options: {
					newcap: false,
					laxbreak: true,
				},
				src: [
					'build/tmp/assets/js/global.js',
					'build/tmp/library/**/*.js',
					'build/tmp/pages/**/*.js'
				]
			}
		},
		cssmin: {
			all : {
				files: [{
					expand: true,
					cwd: 'build/tmp/',
					src: [
						'assets/css/global.css',
						'assets/css/keys.css',
						'pages/**/*.css'
					],
					dest: 'build/tmp/'
				}]
			}
		},
		uglify: {
			all : {
				files: [{
					expand: true,
					cwd: 'build/tmp/',
					src: [
						'assets/js/global.js',
						'library/**/*.js',
						'pages/**/*.js'
					],
					dest: 'build/tmp/'
				}]
			}
		},
		'string-replace': {
			allhtml: {
				src: 'build/tmp/pages/**/*.html',
				dest: 'build/tmp/',
				options: {
					replacements: [
						{
							pattern: /<!-- @buildimportjs (.*?) -->/ig,
							replacement: function (match, p1) {
								return "<script type=\"text/javascript\" src=\""+p1+"\"></script>";
							}
						},
						{
							pattern: /<!-- @buildimportcss (.*?) -->/ig,
							replacement: function (match, p1) {
								return "<link href=\""+p1+"\" rel=\"stylesheet\" type=\"text/css\">";
							}
						},
						{
							pattern: /<!-- @nonbuildstart -->([\s\S]*?)<!-- @nonbuildend -->/ig,
							replacement: function (match, p1) {
								return "";
							}
						}
					]
				}
			},
			devtooltitle: {
				src: 'build/tmp/pages/devtools/init.js',
				dest: 'build/tmp/',
				options: {
					replacements: [
						{
							pattern: /DevKC3Kai/ig,
							replacement: function (match, p1) {
								return "KC3改";
							}
						}
					]
				}
			},
			manifest: {<commit_msg>[Fix #474] Gibberish panel tab name<commit_after>module.exports = function(grunt) {
	
	grunt.initConfig({
		clean: {
			tmp: {
				src: [ 'build/tmp/**/*', 'build/tmp/' ]
			},
			release: {
				src: [ 'build/release/**/*', 'build/release/' ]
			}
		},
		copy: {
			tmpsrc: {
				expand: true,
				cwd: 'src/',
				src: '**/*',
				dest: 'build/tmp/'
			},
			statics: {
				expand: true,
				cwd: 'build/tmp/',
				src: [
					'assets/img/**',
					'assets/snd/**',
					'assets/js/Chart.min.js',
					'assets/js/Dexie.min.js',
					'assets/js/KanColleHelpers.js',
					'assets/js/FileSaver.min.js'
				],
				dest: 'build/release/'
			},
			processed: {
				expand: true,
				cwd: 'build/tmp/',
				src: [
					'assets/css/keys.css',
					'library/helpers/*.js',
					'library/injections/*.js',
					'library/modules/*.js',
					'pages/**/*',
					'!pages/strategy/tabs/**/*.js',
					'manifest.json',
					'data/**/*.json'
				],
				dest: 'build/release/'
			}
		},
		removelogging: {
			'build/tmp': {
				src: "build/tmp/**/*.js"
			}
		},
		jshint: {
			all : {
				options: {
					newcap: false,
					laxbreak: true,
				},
				src: [
					'build/tmp/assets/js/global.js',
					'build/tmp/library/**/*.js',
					'build/tmp/pages/**/*.js'
				]
			}
		},
		cssmin: {
			all : {
				files: [{
					expand: true,
					cwd: 'build/tmp/',
					src: [
						'assets/css/global.css',
						'assets/css/keys.css',
						'pages/**/*.css'
					],
					dest: 'build/tmp/'
				}]
			}
		},
		uglify: {
			all : {
				files: [{
					expand: true,
					cwd: 'build/tmp/',
					src: [
						'assets/js/global.js',
						'library/**/*.js',
						'pages/**/*.js'
					],
					dest: 'build/tmp/'
				}]
			}
		},
		'string-replace': {
			allhtml: {
				src: 'build/tmp/pages/**/*.html',
				dest: 'build/tmp/',
				options: {
					replacements: [
						{
							pattern: /<!-- @buildimportjs (.*?) -->/ig,
							replacement: function (match, p1) {
								return "<script type=\"text/javascript\" src=\""+p1+"\"></script>";
							}
						},
						{
							pattern: /<!-- @buildimportcss (.*?) -->/ig,
							replacement: function (match, p1) {
								return "<link href=\""+p1+"\" rel=\"stylesheet\" type=\"text/css\">";
							}
						},
						{
							pattern: /<!-- @nonbuildstart -->([\s\S]*?)<!-- @nonbuildend -->/ig,
							replacement: function (match, p1) {
								return "";
							}
						}
					]
				}
			},
			devtooltitle: {
				src: 'build/tmp/pages/devtools/init.js',
				dest: 'build/tmp/',
				options: {
					replacements: [
						{
							pattern: /DevKC3Kai/ig,
							replacement: function (match, p1) {
								// return "KC3改";
								return "KanColle";
							}
						}
					]
				}
			},
			manifest: {
{'fraction_non_alphanumeric': 0.22543566926214312, 'fraction_numerical': 0.0035224323322209862, 'mean_word_length': 1.6641975308641976, 'pattern_counts': {'":': 0, '<': 17, '<?xml version=': 0, '>': 17, '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': '3335607', 'n_tokens_mistral': 3006, 'n_tokens_neox': 2068, 'n_words': 305}