diff --git a/packages/browsers/package.json b/packages/browsers/package.json index 6f9c84a6b24..79cd39e05a3 100644 --- a/packages/browsers/package.json +++ b/packages/browsers/package.json @@ -5,7 +5,7 @@ "scripts": { "build:docs": "wireit", "build": "wireit", - "clean": "git clean -Xf -e '!node_modules' .", + "clean": "git clean -Xf $(ls -A | grep -v node_modules)", "test": "wireit" }, "bin": "lib/cjs/main-cli.js", diff --git a/packages/ng-schematics/package.json b/packages/ng-schematics/package.json index ab39572aeb2..6472cd793fd 100644 --- a/packages/ng-schematics/package.json +++ b/packages/ng-schematics/package.json @@ -4,7 +4,7 @@ "description": "Puppeteer Angular schematics", "scripts": { "build": "wireit", - "clean": "git clean -Xf -e '!node_modules' .", + "clean": "git clean -Xf $(ls -A | grep -v node_modules)", "dev:test": "npm run test --watch", "dev": "npm run build --watch", "sandbox:test": "node tools/sandbox.js --test", diff --git a/packages/puppeteer-core/package.json b/packages/puppeteer-core/package.json index 8e5d9e681f2..3815e77d6d6 100644 --- a/packages/puppeteer-core/package.json +++ b/packages/puppeteer-core/package.json @@ -37,7 +37,7 @@ "build:docs": "wireit", "build": "wireit", "check": "tsx tools/ensure-correct-devtools-protocol-package", - "clean": "git clean -Xf -e '!node_modules' .", + "clean": "git clean -Xf $(ls -A | grep -v node_modules)", "prepack": "wireit", "unit": "wireit" }, diff --git a/packages/puppeteer/package.json b/packages/puppeteer/package.json index 704318b3331..2c18af33495 100644 --- a/packages/puppeteer/package.json +++ b/packages/puppeteer/package.json @@ -36,7 +36,7 @@ "scripts": { "build:docs": "wireit", "build": "wireit", - "clean": "git clean -Xf -e '!node_modules' .", + "clean": "git clean -Xf $(ls -A | grep -v node_modules)", "postinstall": "node install.js", "prepack": "wireit" }, diff --git a/packages/testserver/package.json b/packages/testserver/package.json index 8d2a3905fa8..84b544fde80 100644 --- a/packages/testserver/package.json +++ b/packages/testserver/package.json @@ -5,7 +5,7 @@ "main": "lib/index.js", "scripts": { "build": "wireit", - "clean": "git clean -Xf -e '!node_modules' ." + "clean": "git clean -Xf $(ls -A | grep -v node_modules)" }, "wireit": { "build": { diff --git a/test/installation/package.json b/test/installation/package.json index 3eaeda1e1cb..49d8a5acc0b 100644 --- a/test/installation/package.json +++ b/test/installation/package.json @@ -5,7 +5,7 @@ "private": true, "scripts": { "build": "wireit", - "clean": "git clean -Xf -e '!node_modules' .", + "clean": "git clean -Xf $(ls -A | grep -v node_modules)", "test": "mocha" }, "wireit": { diff --git a/test/package.json b/test/package.json index 5a137dcf26b..123f8841b80 100644 --- a/test/package.json +++ b/test/package.json @@ -4,7 +4,7 @@ "private": true, "scripts": { "build": "wireit", - "clean": "git clean -Xf -e '!node_modules' ." + "clean": "git clean -Xf $(ls -A | grep -v node_modules)" }, "wireit": { "build": {