diff --git a/gulpfile.js b/gulpfile.js index c27abefcb8..a86185324a 100644 --- a/gulpfile.js +++ b/gulpfile.js @@ -4,7 +4,6 @@ const fs = require('fs'); const gulp = require('gulp'); -const rimraf = require('rimraf'); const replace = require('gulp-replace'); const terser = require('gulp-terser'); const cssnano = require('gulp-cssnano'); diff --git a/package.json b/package.json index 64f5edcc90..07763b9003 100644 --- a/package.json +++ b/package.json @@ -27,7 +27,8 @@ "e2e": "start-server-and-test start:test http://localhost:61812 cy:run", "mocha": "cd packages/backend && cross-env TS_NODE_FILES=true TS_NODE_TRANSPILE_ONLY=true TS_NODE_PROJECT=\"./test/tsconfig.json\" mocha", "test": "npm run mocha", - "format": "gulp format" + "format": "gulp format", + "clean": "node ./scripts/clean.js" }, "dependencies": { "@types/gulp": "4.0.9", diff --git a/packages/backend/package.json b/packages/backend/package.json index 871a0c5e9f..4376dc4887 100644 --- a/packages/backend/package.json +++ b/packages/backend/package.json @@ -59,7 +59,6 @@ "@types/redis": "2.8.32", "@types/rename": "1.0.4", "@types/request-stats": "3.0.0", - "@types/rimraf": "3.0.2", "@types/seedrandom": "2.4.28", "@types/sharp": "0.29.3", "@types/sinonjs__fake-timers": "6.0.4", @@ -162,7 +161,6 @@ "rename": "1.0.4", "request-stats": "3.0.0", "require-all": "3.0.0", - "rimraf": "3.0.2", "rndstr": "1.0.0", "s-age": "1.1.2", "seedrandom": "3.0.5", diff --git a/packages/backend/yarn.lock b/packages/backend/yarn.lock index 887b540767..0346380ee1 100644 --- a/packages/backend/yarn.lock +++ b/packages/backend/yarn.lock @@ -400,11 +400,6 @@ resolved "https://registry.yarnpkg.com/@types/estree/-/estree-0.0.46.tgz#0fb6bfbbeabd7a30880504993369c4bf1deab1fe" integrity sha512-laIjwTQaD+5DukBZaygQ79K1Z0jb1bPEMRrkXSLjtCcZm+abyp5YbrqpSLzD42FwWW6gK/aS4NYpJ804nG2brg== -"@types/events@*": - version "3.0.0" - resolved "https://registry.yarnpkg.com/@types/events/-/events-3.0.0.tgz#2862f3f58a9a7f7c3e78d79f130dd4d71c25c2a7" - integrity sha512-EaObqwIvayI5a8dCzhFrjKzVwKLxjoG9T6Ppd5CEo07LRKfQ8Yokw54r5+Wq7FaBQ+yXRvQAYPrHwya1/UFt9g== - "@types/express-serve-static-core@*": version "4.17.5" resolved "https://registry.yarnpkg.com/@types/express-serve-static-core/-/express-serve-static-core-4.17.5.tgz#a00ac7dadd746ae82477443e4d480a6a93ea083c" @@ -430,15 +425,6 @@ dependencies: "@types/node" "*" -"@types/glob@*": - version "7.1.1" - resolved "https://registry.yarnpkg.com/@types/glob/-/glob-7.1.1.tgz#aa59a1c6e3fbc421e07ccd31a944c30eba521575" - integrity sha512-1Bh06cbWJUHMC97acuD6UMG29nMt0Aqz1vF3guLfG+kHHJhy3AyohZFFxYk2f7Q1SQIrNwvncxAE0N/9s70F2w== - dependencies: - "@types/events" "*" - "@types/minimatch" "*" - "@types/node" "*" - "@types/glob@7.2.0": version "7.2.0" resolved "https://registry.yarnpkg.com/@types/glob/-/glob-7.2.0.tgz#bc1b5bf3aa92f25bd5dd39f35c57361bdce5b2eb" @@ -778,14 +764,6 @@ dependencies: "@types/node" "*" -"@types/rimraf@3.0.2": - version "3.0.2" - resolved "https://registry.yarnpkg.com/@types/rimraf/-/rimraf-3.0.2.tgz#a63d175b331748e5220ad48c901d7bbf1f44eef8" - integrity sha512-F3OznnSLAUxFrCEu/L5PY8+ny8DtcFRjx7fZZ9bycvXRi3KPTRS9HOitGZwvPg0juRhXFWIeKX58cnX5YqLohQ== - dependencies: - "@types/glob" "*" - "@types/node" "*" - "@types/rsvp@^4.0.4": version "4.0.4" resolved "https://registry.yarnpkg.com/@types/rsvp/-/rsvp-4.0.4.tgz#55e93e7054027f1ad4b4ebc1e60e59eb091e2d32" diff --git a/packages/client/package.json b/packages/client/package.json index 24345b969f..697faee417 100644 --- a/packages/client/package.json +++ b/packages/client/package.json @@ -39,7 +39,6 @@ "@types/random-seed": "0.3.3", "@types/rename": "1.0.4", "@types/request-stats": "3.0.0", - "@types/rimraf": "3.0.2", "@types/seedrandom": "2.4.28", "@types/sinonjs__fake-timers": "6.0.4", "@types/speakeasy": "2.0.6", @@ -113,7 +112,6 @@ "reflect-metadata": "0.1.13", "rename": "1.0.4", "request-stats": "3.0.0", - "rimraf": "3.0.2", "rndstr": "1.0.0", "s-age": "1.1.2", "sass": "1.43.4", diff --git a/packages/client/yarn.lock b/packages/client/yarn.lock index 8dd3579bb2..23d2213205 100644 --- a/packages/client/yarn.lock +++ b/packages/client/yarn.lock @@ -662,14 +662,6 @@ dependencies: "@types/node" "*" -"@types/rimraf@3.0.2": - version "3.0.2" - resolved "https://registry.yarnpkg.com/@types/rimraf/-/rimraf-3.0.2.tgz#a63d175b331748e5220ad48c901d7bbf1f44eef8" - integrity sha512-F3OznnSLAUxFrCEu/L5PY8+ny8DtcFRjx7fZZ9bycvXRi3KPTRS9HOitGZwvPg0juRhXFWIeKX58cnX5YqLohQ== - dependencies: - "@types/glob" "*" - "@types/node" "*" - "@types/seedrandom@2.4.28": version "2.4.28" resolved "https://registry.yarnpkg.com/@types/seedrandom/-/seedrandom-2.4.28.tgz#9ce8fa048c1e8c85cb71d7fe4d704e000226036f" diff --git a/scripts/clean.js b/scripts/clean.js new file mode 100644 index 0000000000..1dca10605f --- /dev/null +++ b/scripts/clean.js @@ -0,0 +1,13 @@ +const fs = require('fs'); +const execa = require('execa'); + +(async () => { + fs.rmSync(__dirname + '/../packages/backend/built', { recursive: true, 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 + '/../built', { recursive: true, force: true }); + fs.rmSync(__dirname + '/../node_modules', { recursive: true, force: true }); +})();