Changeset 26043
- Timestamp:
- 11/08/2013 12:40:38 AM (11 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Gruntfile.js
r26042 r26043 124 124 curly: false, 125 125 eqeqeq: false 126 }, 127 // Limit JSHint's run to a single specified file 128 // grunt jshint:core --file=filename.js 129 filter: function( filepath ) { 130 var file = grunt.option( 'file' ); 131 132 // Don't filter when no target file is specified 133 if ( ! file ) { 134 return true; 135 } 136 137 // Normalize filepath for Windows 138 filepath = filepath.replace( /\\/g, '/' ); 139 140 // Match only the filename passed from cli 141 if ( filepath.lastIndexOf( '/' + file ) === filepath.length - ( file.length + 1 ) ) { 142 return true; 143 } 144 145 return false; 126 146 } 127 147 }
Note: See TracChangeset
for help on using the changeset viewer.