Changeset 43327
- Timestamp:
- 05/29/2018 02:20:44 PM (6 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Gruntfile.js
r43324 r43327 1356 1356 * so that only the changed files are updated. 1357 1357 */ 1358 grunt.event.on( 'watch', function( action, filepath, target ) {1358 grunt.event.on( 'watch', function( action, filepath, target ) { 1359 1359 var src; 1360 1360 … … 1363 1363 return; 1364 1364 } 1365 1366 // Normalize filepath for Windows. 1367 filepath = filepath.replace( /\\/g, '/' ); 1365 1368 1366 1369 // If the target is a file in the restructured js src. … … 1393 1396 grunt.config( [ 'copy', 'includes-js', 'files' ] ) 1394 1397 ); 1398 1395 1399 for ( dest in configs ) { 1396 1400 // If a file in the mapping matches then set the variables for our dynamic tasks. 1397 if ( configs.hasOwnProperty( dest ) && configs[ dest ][0] === './' + filepath ) {1401 if ( dest && configs.hasOwnProperty( dest ) && configs[ dest ][0] === './' + filepath ) { 1398 1402 files[ dest ] = configs[ dest ]; 1399 1403 src = [ path.relative( BUILD_DIR, dest ) ]; … … 1420 1424 } 1421 1425 1426 if ( ! src ) { 1427 grunt.warn( 'Failed to determine the destination file.' ); 1428 return; 1429 } 1430 1422 1431 if ( action === 'deleted' ) { 1423 1432 // Clean up only those files that were deleted.
Note: See TracChangeset
for help on using the changeset viewer.