mirror of
https://github.com/threeal/cmake-action.git
synced 2025-06-08 18:21: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,
|
"root": true,
|
||||||
"ignorePatterns": ["main"],
|
"ignorePatterns": ["dist"],
|
||||||
"extends": ["eslint:recommended", "prettier"],
|
"extends": ["eslint:recommended", "prettier"],
|
||||||
"parserOptions": {
|
"parserOptions": {
|
||||||
"ecmaVersion": 2022,
|
"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
|
yarn.lock -diff linguist-generated
|
||||||
|
12
.github/workflows/test.yaml
vendored
12
.github/workflows/test.yaml
vendored
@ -66,7 +66,7 @@ jobs:
|
|||||||
with:
|
with:
|
||||||
sparse-checkout: |
|
sparse-checkout: |
|
||||||
action.yaml
|
action.yaml
|
||||||
main
|
dist
|
||||||
test
|
test
|
||||||
sparse-checkout-cone-mode: false
|
sparse-checkout-cone-mode: false
|
||||||
|
|
||||||
@ -100,7 +100,7 @@ jobs:
|
|||||||
with:
|
with:
|
||||||
sparse-checkout: |
|
sparse-checkout: |
|
||||||
action.yaml
|
action.yaml
|
||||||
main
|
dist
|
||||||
test
|
test
|
||||||
sparse-checkout-cone-mode: false
|
sparse-checkout-cone-mode: false
|
||||||
|
|
||||||
@ -129,7 +129,7 @@ jobs:
|
|||||||
with:
|
with:
|
||||||
sparse-checkout: |
|
sparse-checkout: |
|
||||||
action.yaml
|
action.yaml
|
||||||
main
|
dist
|
||||||
test
|
test
|
||||||
sparse-checkout-cone-mode: false
|
sparse-checkout-cone-mode: false
|
||||||
|
|
||||||
@ -153,7 +153,7 @@ jobs:
|
|||||||
with:
|
with:
|
||||||
sparse-checkout: |
|
sparse-checkout: |
|
||||||
action.yaml
|
action.yaml
|
||||||
main
|
dist
|
||||||
test
|
test
|
||||||
sparse-checkout-cone-mode: false
|
sparse-checkout-cone-mode: false
|
||||||
|
|
||||||
@ -177,7 +177,7 @@ jobs:
|
|||||||
with:
|
with:
|
||||||
sparse-checkout: |
|
sparse-checkout: |
|
||||||
action.yaml
|
action.yaml
|
||||||
main
|
dist
|
||||||
test
|
test
|
||||||
sparse-checkout-cone-mode: false
|
sparse-checkout-cone-mode: false
|
||||||
|
|
||||||
@ -206,7 +206,7 @@ jobs:
|
|||||||
with:
|
with:
|
||||||
sparse-checkout: |
|
sparse-checkout: |
|
||||||
action.yaml
|
action.yaml
|
||||||
main
|
dist
|
||||||
test
|
test
|
||||||
sparse-checkout-cone-mode: false
|
sparse-checkout-cone-mode: false
|
||||||
|
|
||||||
|
3
.gitignore
vendored
3
.gitignore
vendored
@ -5,5 +5,6 @@
|
|||||||
|
|
||||||
build/
|
build/
|
||||||
coverage/
|
coverage/
|
||||||
dist/
|
|
||||||
node_modules/
|
node_modules/
|
||||||
|
|
||||||
|
src/*.mjs
|
||||||
|
@ -52,4 +52,4 @@ outputs:
|
|||||||
value: ${{ steps.process-inputs.outputs.build-dir }}
|
value: ${{ steps.process-inputs.outputs.build-dir }}
|
||||||
runs:
|
runs:
|
||||||
using: node20
|
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();
|
main();
|
||||||
//# sourceMappingURL=main.mjs.map
|
|
||||||
})();
|
})();
|
||||||
|
|
@ -7,8 +7,5 @@
|
|||||||
"lines": 100,
|
"lines": 100,
|
||||||
"statements": 100
|
"statements": 100
|
||||||
}
|
}
|
||||||
},
|
|
||||||
"moduleNameMapper": {
|
|
||||||
"^(\\.{1,2}/.*)\\.mjs$": "<rootDir>/dist/$1.mjs"
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -3,8 +3,8 @@
|
|||||||
"private": true,
|
"private": true,
|
||||||
"type": "module",
|
"type": "module",
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"build": "tsc && ncc build dist/main.mjs -o main",
|
"build": "tsc && ncc build src/index.mjs -o dist",
|
||||||
"format": "prettier --write . !main !README.md",
|
"format": "prettier --write . !dist !README.md",
|
||||||
"lint": "eslint --ignore-path .gitignore .",
|
"lint": "eslint --ignore-path .gitignore .",
|
||||||
"test": "tsc && jest"
|
"test": "tsc && jest"
|
||||||
},
|
},
|
||||||
|
@ -3,9 +3,6 @@
|
|||||||
"exactOptionalPropertyTypes": true,
|
"exactOptionalPropertyTypes": true,
|
||||||
"strict": true,
|
"strict": true,
|
||||||
"module": "node16",
|
"module": "node16",
|
||||||
"declaration": true,
|
|
||||||
"outDir": "dist",
|
|
||||||
"sourceMap": true,
|
|
||||||
"target": "es2022",
|
"target": "es2022",
|
||||||
"skipLibCheck": true
|
"skipLibCheck": true
|
||||||
},
|
},
|
||||||
|
Loading…
Reference in New Issue
Block a user