diff options
Diffstat (limited to 'remote/test/puppeteer/tools/clean.mjs')
-rwxr-xr-x | remote/test/puppeteer/tools/clean.mjs | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/remote/test/puppeteer/tools/clean.mjs b/remote/test/puppeteer/tools/clean.mjs new file mode 100755 index 0000000000..aa4ba516b1 --- /dev/null +++ b/remote/test/puppeteer/tools/clean.mjs @@ -0,0 +1,18 @@ +#!/usr/bin/env node + +/** + * @license + * Copyright 2022 Google Inc. + * SPDX-License-Identifier: Apache-2.0 + */ + +import {exec} from 'child_process'; +import {readdirSync} from 'fs'; + +exec( + `git clean -Xf ${readdirSync(process.cwd()) + .filter(file => { + return file !== 'node_modules'; + }) + .join(' ')}` +); |