Changeset 26168
- Timestamp:
- 11/14/2013 06:16:59 PM (11 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Gruntfile.js
r26145 r26168 5 5 BUILD_DIR = 'build/'; 6 6 7 // Load tasks. 7 // Load tasks. 8 8 require('matchdep').filterDev('grunt-*').forEach( grunt.loadNpmTasks ); 9 9 … … 205 205 // grunt jshint:core --file=filename.js 206 206 filter: function( filepath ) { 207 var file = grunt.option( 'file' );207 var index, file = grunt.option( 'file' ); 208 208 209 209 // Don't filter when no target file is specified … … 214 214 // Normalize filepath for Windows 215 215 filepath = filepath.replace( /\\/g, '/' ); 216 index = filepath.lastIndexOf( '/' + file ); 216 217 217 218 // Match only the filename passed from cli 218 if ( filepath .lastIndexOf( '/' + file ) === filepath.length - ( file.length + 1) ) {219 if ( filepath === file || ( -1 !== index && index === filepath.length - ( file.length + 1 ) ) ) { 219 220 return true; 220 221 }
Note: See TracChangeset
for help on using the changeset viewer.