<commit_before>module.exports = function(grunt) {
	// Project configuration.
	grunt.initConfig({
		pkg: grunt.file.readJSON('package.json'),
		jshint: {
			boot: {
				// define the files to lint
				src: ['boot/lib/**/*.js', '!boot/lib/**/*.min.js'],
				options: {
					globals: {
						jQuery: true,
						console: true,
						module: false
					}
				}
			},
			usr: {
				src: ['usr/**/*.js', '!usr/**/*.min.js'],
				options: {
					globals: {
						jQuery: true,
						console: true,
						module: false
					}
				}
			}
		},
		clean: {
			tmp: {
				src: ['tmp/**/*']
			}
		},
		convert: {
			ui: {
				files: [
					{
						expand: true,
						src: 'boot/uis/**/*.xml',
						dest: 'dist/',
						ext: '.json'
					}
				]
			},
			applications: {
				options: {
					explicitRoot: false,
					mergeAttrs: true
				},
				files: [
					{
						expand: true,
						src: 'usr/share/applications/*.xml',
						dest: 'dist/',
						ext: '.json'
					}
				]
			},
			categories: {
				options: {
					explicitRoot: false,
					mergeAttrs: true
				},
				files: [
					{
						expand: true,
						src: 'usr/share/categories/*.xml',
						dest: 'dist/',
						ext: '.json'
					}
				]
			}
		},
		uglify: {
			boot: {
				options: {
					banner: '/*! <%= pkg.name %> <%= pkg.version %> <%= grunt.template.today("yyyy-mm-dd") %> */\n'
				},
				files: [
					{
						src: ['build/boot/boot.min.js'],
						dest: 'build/boot/boot.min.js'
					}
				]
			}
		},
		copy: {
			//Build
			build: {
				files: [
					{src: 'boot/includes/index-built.html', dest: 'build/index.php'},
					{
						expand: true,
						dot: true,
						src: ['boot/**', 'etc/**', 'home/**', 'lib/**', 'sbin/**', 'usr/**', 'var/**'],
						dest: 'build/'
					},
					{src: [/*'index.php',*/ '.htaccess'], dest: 'build/'}
				]
			},

			//Standalone
			standalone: {
				files: [
					{src: ['boot/includes/index-standalone.html'], dest: 'build/index.html'},
					{
						expand: true,
						dot: true,
						src: ['boot/uis/**', 'usr/**', 'etc/ske1/**', 'etc/uis.json'],
						dest: 'build/'
					}
				]
			}
		},
		watch: {
			files: ['<%= jshint.files %>'],
			tasks: ['jshint']
		}
	});

	grunt.loadNpmTasks('grunt-contrib-clean');
	grunt.loadNpmTasks('grunt-contrib-uglify');
	grunt.loadNpmTasks('grunt-contrib-jshint');
	//grunt.loadNpmTasks('grunt-contrib-qunit');
	grunt.loadNpmTasks('grunt-contrib-cssmin');
	grunt.loadNpmTasks('grunt-contrib-watch');
	grunt.loadNpmTasks('grunt-contrib-concat');
	grunt.loadNpmTasks('grunt-contrib-copy');
	grunt.loadNpmTasks('grunt-convert');

	grunt.registerTask('gen-boot', 'Concatenate boot files.', function() {
		var bootIncludes = grunt.file.readJSON('etc/boot-includes.json'), bootIncludesList = [];
		for (var filepath in bootIncludes) {
			bootIncludesList.push('./'+filepath);
		}

		grunt.config('concat.boot', {
			options: {
				separator: ';\n'<commit_msg>Adds README.md and COPYING to build folder.<commit_after>module.exports = function(grunt) {
	// Project configuration.
	grunt.initConfig({
		pkg: grunt.file.readJSON('package.json'),
		jshint: {
			boot: {
				// define the files to lint
				src: ['boot/lib/**/*.js', '!boot/lib/**/*.min.js'],
				options: {
					globals: {
						jQuery: true,
						console: true,
						module: false
					}
				}
			},
			usr: {
				src: ['usr/**/*.js', '!usr/**/*.min.js'],
				options: {
					globals: {
						jQuery: true,
						console: true,
						module: false
					}
				}
			}
		},
		clean: {
			tmp: {
				src: ['tmp/**/*']
			}
		},
		convert: {
			ui: {
				files: [
					{
						expand: true,
						src: 'boot/uis/**/*.xml',
						dest: 'dist/',
						ext: '.json'
					}
				]
			},
			applications: {
				options: {
					explicitRoot: false,
					mergeAttrs: true
				},
				files: [
					{
						expand: true,
						src: 'usr/share/applications/*.xml',
						dest: 'dist/',
						ext: '.json'
					}
				]
			},
			categories: {
				options: {
					explicitRoot: false,
					mergeAttrs: true
				},
				files: [
					{
						expand: true,
						src: 'usr/share/categories/*.xml',
						dest: 'dist/',
						ext: '.json'
					}
				]
			}
		},
		uglify: {
			boot: {
				options: {
					banner: '/*! <%= pkg.name %> <%= pkg.version %> <%= grunt.template.today("yyyy-mm-dd") %> */\n'
				},
				files: [
					{
						src: ['build/boot/boot.min.js'],
						dest: 'build/boot/boot.min.js'
					}
				]
			}
		},
		copy: {
			//Build
			build: {
				files: [
					{src: 'boot/includes/index-built.html', dest: 'build/index.php'},
					{
						expand: true,
						dot: true,
						src: ['boot/**', 'etc/**', 'home/**', 'lib/**', 'sbin/**', 'usr/**', 'var/**'],
						dest: 'build/'
					},
					{src: [/*'index.php',*/ 'README.md', 'COPYING', '.htaccess'], dest: 'build/'}
				]
			},

			//Standalone
			standalone: {
				files: [
					{src: ['boot/includes/index-standalone.html'], dest: 'build/index.html'},
					{
						expand: true,
						dot: true,
						src: ['boot/uis/**', 'usr/**', 'etc/ske1/**', 'etc/uis.json', 'README.md', 'COPYING'],
						dest: 'build/'
					}
				]
			}
		},
		watch: {
			files: ['<%= jshint.files %>'],
			tasks: ['jshint']
		}
	});

	grunt.loadNpmTasks('grunt-contrib-clean');
	grunt.loadNpmTasks('grunt-contrib-uglify');
	grunt.loadNpmTasks('grunt-contrib-jshint');
	//grunt.loadNpmTasks('grunt-contrib-qunit');
	grunt.loadNpmTasks('grunt-contrib-cssmin');
	grunt.loadNpmTasks('grunt-contrib-watch');
	grunt.loadNpmTasks('grunt-contrib-concat');
	grunt.loadNpmTasks('grunt-contrib-copy');
	grunt.loadNpmTasks('grunt-convert');

	grunt.registerTask('gen-boot', 'Concatenate boot files.', function() {
		var bootIncludes = grunt.file.readJSON('etc/boot-includes.json'), bootIncludesList = [];
		for (var filepath in bootIncludes) {
			bootIncludesList.push('./'+filepath);
		}

		grunt.config('concat.boot', {
			options: {
				separator: ';\n'
{'fraction_non_alphanumeric': 0.21294718909710392, 'fraction_numerical': 0.00034071550255536625, 'mean_word_length': 2.151368760064412, 'pattern_counts': {'":': 0, '<': 11, '<?xml version=': 0, '>': 11, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 6}, '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': '6832469', 'n_tokens_mistral': 3020, 'n_tokens_neox': 2207, 'n_words': 355}