From 5d0fd9069167afe5d5c4644aeed897d8da7b071a Mon Sep 17 00:00:00 2001 From: Victor Gomes Date: Fri, 27 Sep 2024 15:20:58 -0400 Subject: [PATCH 1/3] =?UTF-8?q?Chore:=20build=20and=20start=20script=20has?= =?UTF-8?q?=20added=20=F0=9F=AA=82?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .gitignore | 3 ++- package.json | 4 +++- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/.gitignore b/.gitignore index 960be9a..8a03e25 100644 --- a/.gitignore +++ b/.gitignore @@ -1,3 +1,4 @@ node_modules package-lock.json -yarn.lock \ No newline at end of file +yarn.lock +dist diff --git a/package.json b/package.json index f3eb353..2773e48 100644 --- a/package.json +++ b/package.json @@ -6,7 +6,9 @@ "scripts": { "dev": "cross-env NODE_ENV=dev nodemon src/index.ts", "test": "cross-env NODE_ENV=test jest", - "lint": "eslint . --fix" + "lint": "eslint . --fix", + "build": "sucrase ./src -d ./dist --transforms typescript,imports", + "start": "node ./dist/index.js" }, "author": "", "license": "ISC", From 5dd23974d34c6c24bfcf1ce9b72c04f864001bd4 Mon Sep 17 00:00:00 2001 From: Victor Gomes Date: Fri, 27 Sep 2024 15:25:15 -0400 Subject: [PATCH 2/3] =?UTF-8?q?Chore:=20husky=20added=20for=20run=20lint?= =?UTF-8?q?=20on=20pre-commit=20=F0=9F=AA=82?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .husky/pre-commit | 1 + package.json | 4 +++- 2 files changed, 4 insertions(+), 1 deletion(-) create mode 100644 .husky/pre-commit diff --git a/.husky/pre-commit b/.husky/pre-commit new file mode 100644 index 0000000..3867a0f --- /dev/null +++ b/.husky/pre-commit @@ -0,0 +1 @@ +npm run lint diff --git a/package.json b/package.json index 2773e48..a49d272 100644 --- a/package.json +++ b/package.json @@ -8,7 +8,8 @@ "test": "cross-env NODE_ENV=test jest", "lint": "eslint . --fix", "build": "sucrase ./src -d ./dist --transforms typescript,imports", - "start": "node ./dist/index.js" + "start": "node ./dist/index.js", + "prepare": "husky" }, "author": "", "license": "ISC", @@ -26,6 +27,7 @@ "cross-env": "^7.0.3", "eslint": "^8.56.0", "globals": "^15.1.0", + "husky": "^9.1.6", "jest": "^29.7.0", "nodemon": "^3.1.0", "sucrase": "^3.35.0", From ea3a7548a14f8c39fb6f5d4049d55ebed98f7512 Mon Sep 17 00:00:00 2001 From: Victor Gomes Date: Fri, 27 Sep 2024 15:28:20 -0400 Subject: [PATCH 3/3] =?UTF-8?q?Chore:=20running=20unit=20specs=20on=20pre-?= =?UTF-8?q?commit=20=F0=9F=A7=B2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .husky/pre-commit | 1 + package.json | 1 + 2 files changed, 2 insertions(+) diff --git a/.husky/pre-commit b/.husky/pre-commit index 3867a0f..53497d3 100644 --- a/.husky/pre-commit +++ b/.husky/pre-commit @@ -1 +1,2 @@ npm run lint +npm run unit-test diff --git a/package.json b/package.json index a49d272..8c33ab3 100644 --- a/package.json +++ b/package.json @@ -6,6 +6,7 @@ "scripts": { "dev": "cross-env NODE_ENV=dev nodemon src/index.ts", "test": "cross-env NODE_ENV=test jest", + "unit-test": "cross-env NODE_ENV=test jest ./src", "lint": "eslint . --fix", "build": "sucrase ./src -d ./dist --transforms typescript,imports", "start": "node ./dist/index.js",