Преглед на файлове

The array will be shared by both tasks, so it may be extracted.

Piotrek Koszuliński преди 11 години
родител
ревизия
7d7dbd3927
променени са 1 файла, в които са добавени 7 реда и са изтрити 6 реда
  1. 7 6
      gruntfile.js

+ 7 - 6
gruntfile.js

@@ -6,23 +6,24 @@ module.exports = function( grunt ) {
 	// First register the "default" task, so it can be analyzed by other tasks.
 	grunt.registerTask( 'default', [ 'jshint:git', 'jscs:git' ] );
 
+	// Files that will be ignored by the "jscs" and "jshint" tasks.
+	var ignoreFiles = [
+		// Automatically loaded from .gitignore. Add more if necessary.
+	];
+
 	// Basic configuration which will be overloaded by the tasks.
 	grunt.initConfig( {
 		pkg: grunt.file.readJSON( 'package.json' ),
 
 		jshint: {
 			options: {
-				ignores: [
-					// Automatically loaded from .gitignore. Add more if necessary.
-				]
+				ignores: ignoreFiles
 			}
 		},
 
 		jscs: {
 			options: {
-				excludeFiles: [
-					// Automatically loaded from .gitignore. Add more if necessary.
-				]
+				excludeFiles: ignoreFiles
 			}
 		}
 	} );