{"size": 585, "ext": "js", "max_stars_repo_path": "tasks/locking.js", "max_stars_repo_name": "ulisesrmzroche/ember-app-kit", "max_stars_repo_stars_event_min_datetime": "2015-01-06T11:00:27.000Z", "max_stars_repo_stars_event_max_datetime": "2022-02-10T12:06:00.000Z", "max_issues_repo_path": "tasks/locking.js", "max_issues_repo_name": "atsjj/EmDi", "max_issues_repo_issues_event_min_datetime": "2015-01-08T08:41:46.000Z", "max_issues_repo_issues_event_max_datetime": "2020-08-11T14:03:39.000Z", "max_forks_repo_path": "tasks/locking.js", "max_forks_repo_name": "blandman/signage-client", "max_forks_repo_forks_event_min_datetime": "2015-01-15T23:48:13.000Z", "max_forks_repo_forks_event_max_datetime": "2021-09-25T08:31:14.000Z"}
{"max_stars_count": 82, "max_issues_count": 8, "max_forks_count": 29, "avg_line_length": 39.0, "max_line_length": 116, "alphanum_fraction": 0.7076923077}
var lockFile = require('lockfile');

module.exports = function(grunt) {
  grunt.registerTask('lock', 'Set semaphore for connect server to wait on.', function() {
    grunt.file.mkdir('tmp');
    lockFile.lockSync('tmp/connect.lock');
    grunt.log.writeln("Locked - Development server won't answer incoming requests until App Kit is done updating.");
  });

  grunt.registerTask('unlock', 'Release semaphore that connect server waits on.', function() {
    lockFile.unlockSync('tmp/connect.lock');
    grunt.log.writeln("Unlocked - Development server now handles requests.");
  });
};
