clean.js 515 B

123456789101112131415161718192021
  1. /**
  2. * React Starter Kit (https://www.reactstarterkit.com/)
  3. *
  4. * Copyright © 2014-2016 Kriasoft, LLC. All rights reserved.
  5. *
  6. * This source code is licensed under the MIT license found in the
  7. * LICENSE.txt file in the root directory of this source tree.
  8. */
  9. import del from 'del';
  10. import fs from './lib/fs';
  11. /**
  12. * Cleans up the output (build) directory.
  13. */
  14. async function clean() {
  15. await del(['.tmp', 'build/*', '!build/.git'], { dot: true });
  16. await fs.makeDir('build/public');
  17. }
  18. export default clean;