Add shebang to output file so a shell script is no longer needed

This commit is contained in:
Marko Korhonen 2023-11-23 17:38:30 +02:00
parent 4b8c8be226
commit cd891bf6a0
Signed by: FunctionalHacker
GPG key ID: A7F78BCB859CD890
5 changed files with 48 additions and 7 deletions

View file

@ -1,14 +1,15 @@
import typescript from '@rollup/plugin-typescript';
import terser from '@rollup/plugin-terser';
import shebang from 'rollup-plugin-add-shebang';
/** @type {import('rollup').RollupOptions} */
const config = {
input: 'src/main.ts',
output: {
format: 'esm',
file: 'dist/wtc.js',
file: 'dist/wtc',
},
plugins: [typescript(), terser()],
plugins: [typescript(), terser(), shebang({ include: 'dist/wtc' })],
};
export default config;