{"size": 1969, "ext": "js", "max_stars_repo_path": "Gruntfile.js", "max_stars_repo_name": "tom-weatherhead/node-js-npm-template", "max_stars_repo_stars_event_min_datetime": "2020-08-08T16:01:57.000Z", "max_stars_repo_stars_event_max_datetime": "2020-08-08T16:01:57.000Z", "max_issues_repo_path": "Gruntfile.js", "max_issues_repo_name": "tom-weatherhead/node-js-npm-template", "max_issues_repo_issues_event_min_datetime": "2020-09-04T14:39:59.000Z", "max_issues_repo_issues_event_max_datetime": "2021-05-07T20:49:16.000Z", "max_forks_repo_path": "Gruntfile.js", "max_forks_repo_name": "tom-weatherhead/node-js-npm-template", "max_forks_repo_forks_event_min_datetime": null, "max_forks_repo_forks_event_max_datetime": null}
{"max_stars_count": 1, "max_issues_count": 3, "max_forks_count": null, "avg_line_length": 19.495049505, "max_line_length": 96, "alphanum_fraction": 0.5535804977}
// node-js-npm-template/Gruntfile.js

'use strict';

module.exports = grunt => {
	const packageJsonFilename = 'package.json';
	const gruntfile = grunt.file.readJSON(packageJsonFilename);

	grunt.initConfig({
		pkg: gruntfile,
		eslint: {
			target: [
				'*.js',
				'src/*.js',
				'test/**/*.js'
			]
		},
		/*
		jasmine: {
			// pivotal: {
			src: 'src/ ** /*.js', // TODO: Delete the spaces in this string.
			options: {
				// specs: 'spec/*Spec.js',
				specs: 'test/jasmine/*_jasmine.js'
				// helpers: 'spec/*Helper.js'
			}
			// }
		},
		karma: {
			unit: {
				options: {
					files: [
						'test/karma/*_karma.js'
					]
				},
				configFile: 'karma.conf.js'
			}
		},
		*/
		mochaTest: {
			options: {
				reporter: 'spec'
			},
			test: {
				src: ['test/mocha/*_mocha.js']
			}
		},
		run: {
			/*
			options: {
				jest: {
					testEnvironment: 'jsdom',
					testMatch: [
						'<rootDir>/test/jest/*_jest.js'
					]
				}
			},
			*/
			npm_test_jest: {
				exec: 'npm run test-jest --silent'
			}
		} /* ,
		watch: {
			js: {
				files: [
					'*.js',
					'src/*.js',
					'test/** /*.js' // TODO: Delete the space in this string.
				],
				tasks: 'build'
			},
			pkg: {
				files: 'package.json',
				tasks: 'build'
			},
			readme: {
				files: 'README.md',
				tasks: 'build'
			}
		} */
	});

	// Tasks
	grunt.loadNpmTasks('grunt-eslint');
	// grunt.loadNpmTasks('grunt-contrib-jasmine');
	// grunt.loadNpmTasks('grunt-contrib-watch');
	// grunt.loadNpmTasks('grunt-karma');
	grunt.loadNpmTasks('grunt-mocha-test');
	grunt.loadNpmTasks('grunt-run');

	// Aliases

	// Old: $ npm i -D chai chai-http grunt grunt-cli grunt-eslint grunt-mocha-test grunt-nsp mocha
	// Old: grunt.registerTask('test', ['eslint', 'mochaTest', 'nsp']);

	// grunt.registerTask('test', ['eslint', 'jasmine', 'karma', 'mochaTest', 'nodeunit']);
	grunt.registerTask('test', ['eslint', 'mochaTest', 'run:npm_test_jest']);

	grunt.registerTask('default', ['test']);
};
