es2049package
Version:
ECMAScript 2049 package: zero-configuration libraries and command-line utilies by Harald Rudell
19 lines (17 loc) • 455 B
JavaScript
/*
© 2017-present Harald Rudell <harald.rudell@gmail.com> (http://www.haraldrudell.com)
This source code is licensed under the ISC-style license found in the LICENSE file in the root directory of this source tree.
*/
import clean from './clean'
export default function cleanPlugin(dirs) {
let didClean
return {
name: 'cleanPlugin',
async load() {
if (!didClean) {
didClean = true
await clean(dirs)
}
},
}
}