How to use find-remove - 1 common examples

To help you get started, we’ve selected a few find-remove examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github salesforce / design-system-react / scripts / publish-to-git.js View on Github external
const publish = (done, type) => {
	const tmpPath = getTmpPath(type);
	const tmpDir = tmpPath();
	const remote = argv.remote || 'origin';

	let typeSuffix = '';
	if (type !== 'commonjs') {
		typeSuffix = `-${type}`;
	}

	const result = findRemoveSync(`${tmpDir}/components`, { dir: '__tests__' });
	console.log('Removed the following test files:');
	console.log(result);

	let actions = [
		{ command: 'git init', dir: tmpDir, rootPath },
		{ command: `cp ${gitDir}/config ${tmpDir}/.git`, rootPath },
		{ command: 'git add -A', dir: tmpDir, rootPath },
	];

	if (argv.tag) {
		actions = [
			...actions,
			{
				command: `git commit -m "Release commit for ${
					argv.tag
				}-${type} [ci skip]"`,

find-remove

recursively finds files and/or directories by filter options from a start directory onwards and deletes these according to plenty of options you can configure. useful if you want to clean up stuff within a directory in your node.js app.

MIT
Latest version published 2 years ago

Package Health Score

44 / 100
Full package analysis

Popular find-remove functions