<commit_before>module.exports = (grunt) ->
	pkg = grunt.file.readJSON('package.json')
	banner = [
		"/** @license "
		"\n* Trocha.js
\n*
\n* This source code is licensed under the Mozillas Public license 2.0 found in the
\n* LICENSE file in the root directory of this source tree.
\n*/\n"
	]
	banner[2] = "#{banner[0]}#{pkg.name}@#{pkg.version} - #{grunt.template.today("yyyy-mm-dd")}#{banner[1]}"
	require('load-grunt-tasks') grunt
	grunt.loadNpmTasks 'grunt-coffeescript-concat'
	grunt.loadNpmTasks 'grunt-includes'
	grunt.loadNpmTasks 'grunt-jsdoc'
	grunt.initConfig
		clean:
			dist: ['./dist/trocha*']
			test: ['./test/test*']
		includes:
			dist:
				files: [
					cwd: './src/v2/',
					src: 'trocha_*.es6.js'
					dest: './dist'
				]
				options:
					flatten: true
					debug: true
					banner: banner[2]
			test:
				files: [
					'./test/test.coffee': './src/test/main_test.coffee'
				]
				options:
					flatten: true
				# files: [
				# 	cwd: './src/test/',
				# 	src: 'main_test.coffee'
				# 	dest: './test'
				# ]
				# options:
				# 	wrapper: 'test.coffee'
				# 	flatten: true
				# 	debug: true
		jsdoc:
			dist:
				src: ['./dist/**/*.es6.js', './README.md']
				dest: './api_doc'

		babel:
			options:
				sourceMap: true
				presets: ["@babel/preset-env"]
				plugins: ["@babel/plugin-proposal-class-properties"]
			module:
				files:
					'./dist/trocha_module.babeled.js': './dist/trocha_module.es6.js'
			library:
				options:
					presets: [["@babel/preset-env", { modules: false }]]
				files:
					'./dist/trocha_library.babeled.js': './dist/trocha_library.es6.js'

		# Only works with ES5
		uglify: prod:
			options:
				banner: banner[2]
				wrap: ''
				report: 'gzip'
				maxLineLen: 0
				screwIE8: true
				preserveComments: false
				compress: drop_console: true
				beautify: false
				sourceMap: false
			files:
				'dist/trocha_module.min.js': 'dist/trocha_module.babeled.js'
				'dist/trocha_library.min.js': 'dist/trocha_library.babeled.js'
		coffee: test:
			options:
				bare: true
				sourceMap: true
			files:
				# 'dist/trocha.deprecated.js': 'dist/trocha.deprecated.coffee'
				'test/test.js': 'test/test.coffee'

		# coffeescript_concat: compile:
		# 	options: {}
		# 	files:
		# 		'dist/trocha.deprecated.coffee': [
		# 			'src/deprecated/end.coffee'
		# 			'src/deprecated/return.coffee'
		# 			'src/deprecated/routes_engine.coffee'
		# 			'src/deprecated/prepare_path.coffee'
		# 			'src/deprecated/constructor.coffee'
		# 			'src/deprecated/object_definition.coffee'
		# 			'src/deprecated/variables.coffee'
		# 			'src/deprecated/start.coffee'
		# 		]
		watch:
			options: livereload: true<commit_msg>optimizing minimization<commit_after>module.exports = (grunt) ->
	pkg = grunt.file.readJSON('package.json')
	banner = [
		"/** @license "
		"\n* Trocha.js
\n*
\n* This source code is licensed under the Mozillas Public license 2.0 found in the
\n* LICENSE file in the root directory of this source tree.
\n*/\n"
	]
	banner[2] = "#{banner[0]}#{pkg.name}@#{pkg.version} - #{grunt.template.today("yyyy-mm-dd")}#{banner[1]}"
	require('load-grunt-tasks') grunt
	grunt.loadNpmTasks 'grunt-coffeescript-concat'
	grunt.loadNpmTasks 'grunt-includes'
	grunt.loadNpmTasks 'grunt-jsdoc'
	grunt.initConfig
		clean:
			dist: ['./dist/trocha*']
			test: ['./test/test*']
		includes:
			dist:
				files: [
					cwd: './src/v2/',
					src: 'trocha_*.es6.js'
					dest: './dist'
				]
				options:
					flatten: true
					debug: true
					banner: banner[2]
			test:
				files: [
					'./test/test.coffee': './src/test/main_test.coffee'
				]
				options:
					flatten: true
				# files: [
				# 	cwd: './src/test/',
				# 	src: 'main_test.coffee'
				# 	dest: './test'
				# ]
				# options:
				# 	wrapper: 'test.coffee'
				# 	flatten: true
				# 	debug: true
		jsdoc:
			dist:
				src: ['./dist/**/*.es6.js', './README.md']
				dest: './api_doc'

		babel:
			options:
				sourceMap: true
				presets: ["@babel/preset-env"]
				plugins: ["@babel/plugin-proposal-class-properties"]
			module:
				files:
					'./dist/trocha_module.babeled.js': './dist/trocha_module.es6.js'
			library:
				options:
					presets: [["@babel/preset-env", { modules: false }]]
				files:
					'./dist/trocha_library.babeled.js': './dist/trocha_library.es6.js'

		# Only works with ES5
		uglify: prod:
			options:
				banner: banner[2]
				wrap: ''
				report: 'gzip'
				maxLineLen: 0
				screwIE8: true
				preserveComments: false
				compress:
					passes: 3
					warnings: true
				beautify: false
				sourceMap: false
				mangle: # false
					reserved: [
						'Trocha'
						'Route'
						'Alias'
						'Resource'
						'Scope'
					]
			files:
				'dist/trocha_module.min.js': 'dist/trocha_module.babeled.js'
				'dist/trocha_library.min.js': 'dist/trocha_library.babeled.js'
		coffee: test:
			options:
				bare: true
				sourceMap: true
			files:
				# 'dist/trocha.deprecated.js': 'dist/trocha.deprecated.coffee'
				'test/test.js': 'test/test.coffee'

		# coffeescript_concat: compile:
		# 	options: {}
		# 	files:
		# 		'dist/trocha.deprecated.coffee': [
		# 			'src/deprecated/end.coffee'
		# 			'src/deprecated/return.coffee'
		# 			'src/deprecated/routes_engine.coffee'
		# 			'src/deprecated/prepare_path.coffee'
		# 			'src/deprecated/constructor.coffee'
		# 			'src/deprecated/object_definition.coffee'
		# 			'src/deprecated/variables.coffee'
		# 			'src/deprecated/start.coffee'
		# 		]
		watch:
			options: livereload: true
{'fraction_non_alphanumeric': 0.16428832784485914, 'fraction_numerical': 0.005671423344310282, 'mean_word_length': 2.6519706078824314, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 5, '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': '4775774', 'n_tokens_mistral': 2717, 'n_tokens_neox': 2173, 'n_words': 364}