puppeteer/tools/clean.mjs

19 lines
319 B
JavaScript
Raw Permalink Normal View History

#!/usr/bin/env node
2024-01-31 15:01:27 +00:00
/**
* @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(' ')}`
);