From 27728d4d50ec46f5b01d38d68c27bebd0499b7cb Mon Sep 17 00:00:00 2001 From: Mikhail Dudin Date: Sun, 17 Jul 2022 18:54:16 +0300 Subject: [PATCH] Add rimraf to clean lib directory before publishing --- .npmignore | 3 ++- package-lock.json | 25 +++++++++++++++++++++++++ package.json | 3 ++- 3 files changed, 29 insertions(+), 2 deletions(-) diff --git a/.npmignore b/.npmignore index 6b154b6..d1d52e9 100644 --- a/.npmignore +++ b/.npmignore @@ -6,4 +6,5 @@ lib/dict-transformer/ lib/test/ custom.json *.map -.idea \ No newline at end of file +.idea +.travis.yml \ No newline at end of file diff --git a/package-lock.json b/package-lock.json index 0fb6a4a..7a87960 100644 --- a/package-lock.json +++ b/package-lock.json @@ -14,6 +14,7 @@ "@types/node": "^10.12.18", "chai": "^4.2.0", "mocha": "^8.0.1", + "rimraf": "^3.0.2", "typescript": "^4.5.4" } }, @@ -1095,6 +1096,21 @@ "integrity": "sha512-NKN5kMDylKuldxYLSUfrbo5Tuzh4hd+2E8NPPX02mZtn1VuREQToYe/ZdlJy+J3uCpfaiGF05e7B8W0iXbQHmg==", "dev": true }, + "node_modules/rimraf": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-3.0.2.tgz", + "integrity": "sha512-JZkJMZkAGFFPP2YqXZXPbMlMBgsxzE8ILs4lMIX/2o0L9UBw9O/Y3o6wFw/i9YLapcUJWwqbi3kdxIPdC62TIA==", + "dev": true, + "dependencies": { + "glob": "^7.1.3" + }, + "bin": { + "rimraf": "bin.js" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + } + }, "node_modules/serialize-javascript": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/serialize-javascript/-/serialize-javascript-3.0.0.tgz", @@ -2253,6 +2269,15 @@ "integrity": "sha512-NKN5kMDylKuldxYLSUfrbo5Tuzh4hd+2E8NPPX02mZtn1VuREQToYe/ZdlJy+J3uCpfaiGF05e7B8W0iXbQHmg==", "dev": true }, + "rimraf": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-3.0.2.tgz", + "integrity": "sha512-JZkJMZkAGFFPP2YqXZXPbMlMBgsxzE8ILs4lMIX/2o0L9UBw9O/Y3o6wFw/i9YLapcUJWwqbi3kdxIPdC62TIA==", + "dev": true, + "requires": { + "glob": "^7.1.3" + } + }, "serialize-javascript": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/serialize-javascript/-/serialize-javascript-3.0.0.tgz", diff --git a/package.json b/package.json index 19a5174..1d9f739 100644 --- a/package.json +++ b/package.json @@ -22,7 +22,7 @@ "ts": "tsc -w", "test": "tsc && mocha ./lib/test --reduplicate", "repl": "tsc && node ./lib/repl.js", - "prepublishOnly": "npm run test" + "prepublishOnly": "rimraf lib && npm run test" }, "devDependencies": { "@types/chai": "^4.1.7", @@ -30,6 +30,7 @@ "@types/node": "^10.12.18", "chai": "^4.2.0", "mocha": "^8.0.1", + "rimraf": "^3.0.2", "typescript": "^4.5.4" }, "repository": {