mirror of
https://github.com/renovatebot/github-action.git
synced 2025-12-15 16:32:36 +00:00
build: use esbuild (#887)
This commit is contained in:
parent
d16f12d19b
commit
4a407be28a
9 changed files with 288 additions and 144 deletions
14
tools/compile.js
Normal file
14
tools/compile.js
Normal file
|
|
@ -0,0 +1,14 @@
|
|||
import { build } from 'esbuild';
|
||||
import { env } from 'node:process';
|
||||
|
||||
await build({
|
||||
entryPoints: ['./src/index.ts'],
|
||||
bundle: true,
|
||||
platform: 'node',
|
||||
target: 'node20',
|
||||
minify: !!env['CI'],
|
||||
tsconfig: 'tsconfig.dist.json',
|
||||
sourcemap: true,
|
||||
// format: 'esm', // TODO: later PR
|
||||
outdir: './dist/',
|
||||
});
|
||||
3
tools/package.json
Normal file
3
tools/package.json
Normal file
|
|
@ -0,0 +1,3 @@
|
|||
{
|
||||
"type": "module"
|
||||
}
|
||||
11
tools/tsconfig.json
Normal file
11
tools/tsconfig.json
Normal file
|
|
@ -0,0 +1,11 @@
|
|||
{
|
||||
"extends": [
|
||||
"@tsconfig/strictest/tsconfig.json",
|
||||
"@tsconfig/node20/tsconfig.json"
|
||||
],
|
||||
"compilerOptions": {
|
||||
"allowSyntheticDefaultImports": true,
|
||||
"esModuleInterop": true,
|
||||
"noEmit": true
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue