From d75cb1e4e63de88c507ec70bc1225e10515a8ceb Mon Sep 17 00:00:00 2001 From: Alfi Maulana Date: Thu, 14 Dec 2023 18:10:19 +0700 Subject: [PATCH] build(typescript): modify source files to be compiled to the same dir --- .gitattributes | 2 +- .gitignore | 3 ++- jest.config.json | 3 --- package.json | 2 +- tsconfig.json | 1 - 5 files changed, 4 insertions(+), 7 deletions(-) diff --git a/.gitattributes b/.gitattributes index 0e05081..5760e90 100644 --- a/.gitattributes +++ b/.gitattributes @@ -1,2 +1,2 @@ -main/index.mjs -diff linguist-generated +dist/index.mjs -diff linguist-generated yarn.lock -diff linguist-generated diff --git a/.gitignore b/.gitignore index 4f2f85c..aed26c5 100644 --- a/.gitignore +++ b/.gitignore @@ -5,5 +5,6 @@ build/ coverage/ -dist/ node_modules/ + +src/*.mjs diff --git a/jest.config.json b/jest.config.json index 8b7bd70..aef53fe 100644 --- a/jest.config.json +++ b/jest.config.json @@ -7,8 +7,5 @@ "lines": 100, "statements": 100 } - }, - "moduleNameMapper": { - "^(\\.{1,2}/.*)\\.mjs$": "/dist/$1.mjs" } } diff --git a/package.json b/package.json index 5a76fe6..cecdee9 100644 --- a/package.json +++ b/package.json @@ -3,7 +3,7 @@ "private": true, "type": "module", "scripts": { - "build": "tsc && ncc build dist/main.mjs -o main", + "build": "tsc && ncc build src/main.mjs -o main", "format": "prettier --write . !main !README.md", "lint": "eslint --ignore-path .gitignore .", "test": "tsc && jest" diff --git a/tsconfig.json b/tsconfig.json index 4caeab2..e9de469 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -3,7 +3,6 @@ "exactOptionalPropertyTypes": true, "strict": true, "module": "node16", - "outDir": "dist", "target": "es2022", "skipLibCheck": true },