chore: use cross-platform clean script (#10938)
This commit is contained in:
parent
0e612ab0a4
commit
86df093824
@ -5,7 +5,7 @@
|
|||||||
"scripts": {
|
"scripts": {
|
||||||
"build:docs": "wireit",
|
"build:docs": "wireit",
|
||||||
"build": "wireit",
|
"build": "wireit",
|
||||||
"clean": "git clean -Xf $(ls -A | grep -v node_modules)",
|
"clean": "../../tools/clean.js",
|
||||||
"test": "wireit"
|
"test": "wireit"
|
||||||
},
|
},
|
||||||
"bin": "lib/cjs/main-cli.js",
|
"bin": "lib/cjs/main-cli.js",
|
||||||
|
@ -4,7 +4,7 @@
|
|||||||
"description": "Puppeteer Angular schematics",
|
"description": "Puppeteer Angular schematics",
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"build": "wireit",
|
"build": "wireit",
|
||||||
"clean": "git clean -Xf $(ls -A | grep -v node_modules)",
|
"clean": "../../tools/clean.js",
|
||||||
"dev:test": "npm run test --watch",
|
"dev:test": "npm run test --watch",
|
||||||
"dev": "npm run build --watch",
|
"dev": "npm run build --watch",
|
||||||
"sandbox:test": "node tools/sandbox.js --test",
|
"sandbox:test": "node tools/sandbox.js --test",
|
||||||
|
@ -37,7 +37,7 @@
|
|||||||
"build:docs": "wireit",
|
"build:docs": "wireit",
|
||||||
"build": "wireit",
|
"build": "wireit",
|
||||||
"check": "tsx tools/ensure-correct-devtools-protocol-package",
|
"check": "tsx tools/ensure-correct-devtools-protocol-package",
|
||||||
"clean": "git clean -Xf $(ls -A | grep -v node_modules)",
|
"clean": "../../tools/clean.js",
|
||||||
"prepack": "wireit",
|
"prepack": "wireit",
|
||||||
"unit": "wireit"
|
"unit": "wireit"
|
||||||
},
|
},
|
||||||
|
@ -36,7 +36,7 @@
|
|||||||
"scripts": {
|
"scripts": {
|
||||||
"build:docs": "wireit",
|
"build:docs": "wireit",
|
||||||
"build": "wireit",
|
"build": "wireit",
|
||||||
"clean": "git clean -Xf $(ls -A | grep -v node_modules)",
|
"clean": "../../tools/clean.js",
|
||||||
"postinstall": "node install.js",
|
"postinstall": "node install.js",
|
||||||
"prepack": "wireit"
|
"prepack": "wireit"
|
||||||
},
|
},
|
||||||
|
@ -5,7 +5,7 @@
|
|||||||
"main": "lib/index.js",
|
"main": "lib/index.js",
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"build": "wireit",
|
"build": "wireit",
|
||||||
"clean": "git clean -Xf $(ls -A | grep -v node_modules)"
|
"clean": "../../tools/clean.js"
|
||||||
},
|
},
|
||||||
"wireit": {
|
"wireit": {
|
||||||
"build": {
|
"build": {
|
||||||
|
@ -5,7 +5,7 @@
|
|||||||
"private": true,
|
"private": true,
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"build": "wireit",
|
"build": "wireit",
|
||||||
"clean": "git clean -Xf $(ls -A | grep -v node_modules)",
|
"clean": "../../tools/clean.js",
|
||||||
"test": "mocha"
|
"test": "mocha"
|
||||||
},
|
},
|
||||||
"wireit": {
|
"wireit": {
|
||||||
|
@ -4,7 +4,7 @@
|
|||||||
"private": true,
|
"private": true,
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"build": "wireit",
|
"build": "wireit",
|
||||||
"clean": "git clean -Xf $(ls -A | grep -v node_modules)"
|
"clean": "../tools/clean.js"
|
||||||
},
|
},
|
||||||
"wireit": {
|
"wireit": {
|
||||||
"build": {
|
"build": {
|
||||||
|
12
tools/clean.js
Executable file
12
tools/clean.js
Executable file
@ -0,0 +1,12 @@
|
|||||||
|
#!/usr/bin/env node
|
||||||
|
|
||||||
|
const {exec} = require('child_process');
|
||||||
|
const {readdirSync} = require('fs');
|
||||||
|
|
||||||
|
exec(
|
||||||
|
`git clean -Xf ${readdirSync(process.cwd())
|
||||||
|
.filter(file => {
|
||||||
|
return file !== 'node_modules';
|
||||||
|
})
|
||||||
|
.join(' ')}`
|
||||||
|
);
|
Loading…
Reference in New Issue
Block a user