11cb0ef41Sopenharmony_ci'use strict' 21cb0ef41Sopenharmony_ci 31cb0ef41Sopenharmony_ciconst fs = require('graceful-fs').promises 41cb0ef41Sopenharmony_ciconst log = require('./log') 51cb0ef41Sopenharmony_ci 61cb0ef41Sopenharmony_ciasync function clean (gyp, argv) { 71cb0ef41Sopenharmony_ci // Remove the 'build' dir 81cb0ef41Sopenharmony_ci const buildDir = 'build' 91cb0ef41Sopenharmony_ci 101cb0ef41Sopenharmony_ci log.verbose('clean', 'removing "%s" directory', buildDir) 111cb0ef41Sopenharmony_ci await fs.rm(buildDir, { recursive: true, force: true }) 121cb0ef41Sopenharmony_ci} 131cb0ef41Sopenharmony_ci 141cb0ef41Sopenharmony_cimodule.exports = clean 151cb0ef41Sopenharmony_cimodule.exports.usage = 'Removes any generated build files and the "out" dir' 16