{"size": 475, "ext": "js", "max_stars_repo_path": "lib/bootstrap/deleteScripts.js", "max_stars_repo_name": "garnerp/contentful-migrate", "max_stars_repo_stars_event_min_datetime": null, "max_stars_repo_stars_event_max_datetime": null, "max_issues_repo_path": "lib/bootstrap/deleteScripts.js", "max_issues_repo_name": "garnerp/contentful-migrate", "max_issues_repo_issues_event_min_datetime": null, "max_issues_repo_issues_event_max_datetime": null, "max_forks_repo_path": "lib/bootstrap/deleteScripts.js", "max_forks_repo_name": "garnerp/contentful-migrate", "max_forks_repo_forks_event_min_datetime": null, "max_forks_repo_forks_event_max_datetime": null}
{"max_stars_count": null, "max_issues_count": null, "max_forks_count": null, "avg_line_length": 27.9411764706, "max_line_length": 74, "alphanum_fraction": 0.6463157895}
const log = require('migrate/lib/log');
const logError = require('migrate/lib/log').error;
const rimraf = require('rimraf');

const deleteScripts = (migrationsDirectory) => {
  return new Promise((resolve, reject) => {
    return rimraf(migrationsDirectory, (error) => {
      if (error) {
        reject(logError('🚨   Failed to delete migrations folder', error));
      }
      resolve(log('Migrations folder', 'deleted'));
    });
  });
};

module.exports = deleteScripts;
