tasks/task_helper.js
function(filepath, options) {
        // options.mtimeOffset: 3 default
        if (!fileUpdates.offset) { fileUpdates.offset = options.mtimeOffset || 3; }
        if (!fileUpdates.storeData) {
          // Initialize data.
          if (grunt.file.exists(fileUpdates.storeDataPath)) {
            fileUpdates.storeData = grunt.file.readJSON(fileUpdates.storeDataPath);
          }
          if (!fileUpdates.storeData) { fileUpdates.storeData = {}; }
          // Run the task that finalize data.
          grunt.task.run('taskHelperFin');
          // The task starts after current target. NOT task.
          // (i.e. every target, and before other tasks)
          // Can't specify time after all tasks?
          // Grunt 0.5 may support a event that all tasks finish.
          // https://github.com/gruntjs/grunt/wiki/Roadmap
        }

        filepath = path.resolve(filepath); // full-path
        if (!(filepath in fileUpdates.storeData)) { fileUpdates.storeData[filepath] = 0; }
        return fileUpdates.storeData[filepath];
      }
function(filepath, options) {
        // options.mtimeOffset: 3 default
        if (!fileUpdates.offset) { fileUpdates.offset = options.mtimeOffset || 3; }
        if (!fileUpdates.storeData) {
          // Initialize data.
          if (grunt.file.exists(fileUpdates.storeDataPath)) {
            fileUpdates.storeData = grunt.file.readJSON(fileUpdates.storeDataPath);
          }
          if (!fileUpdates.storeData) { fileUpdates.storeData = {}; }
          // Run the task that finalize data.
          grunt.task.run('taskHelperFin');
          // The task starts after current target. NOT task.
          // (i.e. every target, and before other tasks)
          // Can't specify time after all tasks?
          // Grunt 0.5 may support a event that all tasks finish.
          // https://github.com/gruntjs/grunt/wiki/Roadmap
        }

        filepath = path.resolve(filepath); // full-path
        if (!(filepath in fileUpdates.storeData)) { fileUpdates.storeData[filepath] = 0; }
        return fileUpdates.storeData[filepath];
      }
function ( filepath , options ) { // options.mtimeOffset: 3 default if ( ! fileUpdates . offset ) { fileUpdates . offset = options . mtimeOffset || 3 ; } if ( ! fileUpdates . storeData ) { // Initialize data. if ( grunt . file . exists ( fileUpdates . storeDataPath ) ) { fileUpdates . storeData = grunt . file . readJSON ( fileUpdates . storeDataPath ) ; } if ( ! fileUpdates . storeData ) { fileUpdates . storeData = { } ; } // Run the task that finalize data. grunt . task . run ( 'taskHelperFin' ) ; // The task starts after current target. NOT task. // (i.e. every target, and before other tasks) // Can't specify time after all tasks? // Grunt 0.5 may support a event that all tasks finish. // https://github.com/gruntjs/grunt/wiki/Roadmap } filepath = path . resolve ( filepath ) ; // full-path if ( ! ( filepath in fileUpdates . storeData ) ) { fileUpdates . storeData [ filepath ] = 0 ; } return fileUpdates . storeData [ filepath ] ; }
retrieve last update of file.
retrieve last update of file .