Revert "Use native shell commands for clean/clean-all" #170

Merged
norm merged 3 commits from revert-native-clean into main 2022-09-23 22:15:30 +00:00
7 changed files with 30 additions and 13 deletions

View file

@ -26,8 +26,8 @@
"mocha": "yarn workspace backend run mocha",
"test": "yarn mocha",
"format": "gulp format",
"clean": "yarn workspaces foreach run clean && rm -rf built/",
"clean-all": "yarn workspaces foreach run clean-all && rm -rf built/ node_modules/",
"clean": "node ./scripts/clean.js",
"clean-all": "node ./scripts/clean-all.js",
"cleanall": "yarn clean-all"
},
"resolutions": {

View file

@ -6,8 +6,6 @@
"type": "module",
"scripts": {
"build": "tsc -p tsconfig.json || echo done. && tsc-alias -p tsconfig.json",
"clean": "rm -rf built/ tsconfig.tsbuildinfo",
"clean-all": "yarn clean && rm -rf node_modules/",
"watch": "node watch.mjs",
"lint": "eslint src --ext .ts",
"mocha": "cross-env NODE_ENV=test TS_NODE_FILES=true TS_NODE_TRANSPILE_ONLY=true TS_NODE_PROJECT=\"./test/tsconfig.json\" mocha",

View file

@ -5,9 +5,7 @@
"scripts": {
"watch": "vite build --watch --mode development",
"build": "vite build",
"lint": "eslint src --ext .ts,.vue",
"clean": "rm -rf built/",
"clean-all": "yarn clean && rm -rf node_modules/"
"lint": "eslint src --ext .ts,.vue"
},
"dependencies": {
"@discordapp/twemoji": "14.0.2",

View file

@ -14,9 +14,7 @@
"api-prod": "npx api-extractor run --verbose",
"lint": "eslint . --ext .js,.jsx,.ts,.tsx",
"jest": "jest --coverage --detectOpenHandles",
"test": "yarn jest && yarn tsd",
"clean": "rm -rf built/",
"clean-all": "yarn clean && rm -rf node_modules/"
"test": "yarn jest && yarn tsd"
},
"devDependencies": {
"@microsoft/api-extractor": "^7.19.3",

View file

@ -5,9 +5,7 @@
"scripts": {
"watch": "node build.js watch",
"build": "node build.js",
"lint": "eslint src --ext .ts",
"clean": "rm -rf built/",
"clean-all": "yarn clean && rm -rf node_modules/"
"lint": "eslint src --ext .ts"
},
"dependencies": {
"esbuild": "^0.14.13",

17
scripts/clean-all.js Normal file
View file

@ -0,0 +1,17 @@
const fs = require('fs');
fs.rmSync(__dirname + '/../packages/backend/built', { recursive: true, force: true });
fs.rmSync(__dirname + '/../packages/backend/tsconfig.tsbuildinfo', { force: true });
fs.rmSync(__dirname + '/../packages/backend/node_modules', { recursive: true, force: true });
fs.rmSync(__dirname + '/../packages/client/built', { recursive: true, force: true });
fs.rmSync(__dirname + '/../packages/client/node_modules', { recursive: true, force: true });
fs.rmSync(__dirname + '/../packages/foundkey-js/built', { recursive: true, force: true });
fs.rmSync(__dirname + '/../packages/foundkey-js/node_modules', { recursive: true, force: true });
fs.rmSync(__dirname + '/../packages/sw/built', { recursive: true, force: true });
fs.rmSync(__dirname + '/../packages/sw/node_modules', { recursive: true, force: true });
fs.rmSync(__dirname + '/../built', { recursive: true, force: true });
fs.rmSync(__dirname + '/../node_modules', { recursive: true, force: true });

8
scripts/clean.js Normal file
View file

@ -0,0 +1,8 @@
const fs = require('fs');
fs.rmSync(__dirname + '/../packages/backend/built', { recursive: true, force: true });
fs.rmSync(__dirname + '/../packages/backend/tsconfig.tsbuildinfo', { force: true });
fs.rmSync(__dirname + '/../packages/client/built', { recursive: true, force: true });
fs.rmSync(__dirname + '/../packages/foundkey-js/built', { recursive: true, force: true });
fs.rmSync(__dirname + '/../packages/sw/built', { recursive: true, force: true });
fs.rmSync(__dirname + '/../built', { recursive: true, force: true });