build(typescript): modify source files to be compiled to the same dir

This commit is contained in:
Alfi Maulana 2023-12-14 18:10:19 +07:00
parent 8bd45b8e9b
commit d75cb1e4e6
No known key found for this signature in database
GPG Key ID: 2242A64C2A8DF5A4
5 changed files with 4 additions and 7 deletions

2
.gitattributes vendored
View File

@ -1,2 +1,2 @@
main/index.mjs -diff linguist-generated
dist/index.mjs -diff linguist-generated
yarn.lock -diff linguist-generated

3
.gitignore vendored
View File

@ -5,5 +5,6 @@
build/
coverage/
dist/
node_modules/
src/*.mjs

View File

@ -7,8 +7,5 @@
"lines": 100,
"statements": 100
}
},
"moduleNameMapper": {
"^(\\.{1,2}/.*)\\.mjs$": "<rootDir>/dist/$1.mjs"
}
}

View File

@ -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"

View File

@ -3,7 +3,6 @@
"exactOptionalPropertyTypes": true,
"strict": true,
"module": "node16",
"outDir": "dist",
"target": "es2022",
"skipLibCheck": true
},