mirror of
https://github.com/threeal/cmake-action.git
synced 2025-04-20 02:31:20 +00:00
build: adjust source files structures (#136)
* build(typescript): disable from generating source map * build(typescript): disable from generating declaration file * build(typescript): modify source files to be compiled to the same dir * build(typescript): modify distribution files to be generated to `dist` directory * refactor: rename main entrypoint from `main` to `index` * chore(git): specify attribute for `dist` directory instead of just `dist/index.mjs`
This commit is contained in:
parent
0a416228af
commit
65845a480e
@ -1,6 +1,6 @@
|
||||
{
|
||||
"root": true,
|
||||
"ignorePatterns": ["main"],
|
||||
"ignorePatterns": ["dist"],
|
||||
"extends": ["eslint:recommended", "prettier"],
|
||||
"parserOptions": {
|
||||
"ecmaVersion": 2022,
|
||||
|
2
.gitattributes
vendored
2
.gitattributes
vendored
@ -1,2 +1,2 @@
|
||||
main/index.mjs -diff linguist-generated
|
||||
dist/** -diff linguist-generated
|
||||
yarn.lock -diff linguist-generated
|
||||
|
12
.github/workflows/test.yaml
vendored
12
.github/workflows/test.yaml
vendored
@ -66,7 +66,7 @@ jobs:
|
||||
with:
|
||||
sparse-checkout: |
|
||||
action.yaml
|
||||
main
|
||||
dist
|
||||
test
|
||||
sparse-checkout-cone-mode: false
|
||||
|
||||
@ -100,7 +100,7 @@ jobs:
|
||||
with:
|
||||
sparse-checkout: |
|
||||
action.yaml
|
||||
main
|
||||
dist
|
||||
test
|
||||
sparse-checkout-cone-mode: false
|
||||
|
||||
@ -129,7 +129,7 @@ jobs:
|
||||
with:
|
||||
sparse-checkout: |
|
||||
action.yaml
|
||||
main
|
||||
dist
|
||||
test
|
||||
sparse-checkout-cone-mode: false
|
||||
|
||||
@ -153,7 +153,7 @@ jobs:
|
||||
with:
|
||||
sparse-checkout: |
|
||||
action.yaml
|
||||
main
|
||||
dist
|
||||
test
|
||||
sparse-checkout-cone-mode: false
|
||||
|
||||
@ -177,7 +177,7 @@ jobs:
|
||||
with:
|
||||
sparse-checkout: |
|
||||
action.yaml
|
||||
main
|
||||
dist
|
||||
test
|
||||
sparse-checkout-cone-mode: false
|
||||
|
||||
@ -206,7 +206,7 @@ jobs:
|
||||
with:
|
||||
sparse-checkout: |
|
||||
action.yaml
|
||||
main
|
||||
dist
|
||||
test
|
||||
sparse-checkout-cone-mode: false
|
||||
|
||||
|
3
.gitignore
vendored
3
.gitignore
vendored
@ -5,5 +5,6 @@
|
||||
|
||||
build/
|
||||
coverage/
|
||||
dist/
|
||||
node_modules/
|
||||
|
||||
src/*.mjs
|
||||
|
@ -52,4 +52,4 @@ outputs:
|
||||
value: ${{ steps.process-inputs.outputs.build-dir }}
|
||||
runs:
|
||||
using: node20
|
||||
main: main/index.mjs
|
||||
main: dist/index.mjs
|
||||
|
2
main/index.mjs → dist/index.mjs
generated
vendored
2
main/index.mjs → dist/index.mjs
generated
vendored
@ -27303,6 +27303,6 @@ async function main() {
|
||||
}
|
||||
}
|
||||
main();
|
||||
//# sourceMappingURL=main.mjs.map
|
||||
|
||||
})();
|
||||
|
@ -7,8 +7,5 @@
|
||||
"lines": 100,
|
||||
"statements": 100
|
||||
}
|
||||
},
|
||||
"moduleNameMapper": {
|
||||
"^(\\.{1,2}/.*)\\.mjs$": "<rootDir>/dist/$1.mjs"
|
||||
}
|
||||
}
|
||||
|
@ -3,8 +3,8 @@
|
||||
"private": true,
|
||||
"type": "module",
|
||||
"scripts": {
|
||||
"build": "tsc && ncc build dist/main.mjs -o main",
|
||||
"format": "prettier --write . !main !README.md",
|
||||
"build": "tsc && ncc build src/index.mjs -o dist",
|
||||
"format": "prettier --write . !dist !README.md",
|
||||
"lint": "eslint --ignore-path .gitignore .",
|
||||
"test": "tsc && jest"
|
||||
},
|
||||
|
@ -3,9 +3,6 @@
|
||||
"exactOptionalPropertyTypes": true,
|
||||
"strict": true,
|
||||
"module": "node16",
|
||||
"declaration": true,
|
||||
"outDir": "dist",
|
||||
"sourceMap": true,
|
||||
"target": "es2022",
|
||||
"skipLibCheck": true
|
||||
},
|
||||
|
Loading…
Reference in New Issue
Block a user