wip
This commit is contained in:
parent
a492fc6887
commit
91a367f7ce
19 changed files with 1659 additions and 2 deletions
26
esbuild.config.mjs
Normal file
26
esbuild.config.mjs
Normal file
|
|
@ -0,0 +1,26 @@
|
|||
import * as esbuild from 'esbuild';
|
||||
import * as fs from 'fs';
|
||||
import * as path from 'path';
|
||||
import { fileURLToPath } from 'url';
|
||||
|
||||
const __filename = fileURLToPath(import.meta.url);
|
||||
const __dirname = path.dirname(__filename);
|
||||
|
||||
const metadata = fs.readFileSync(
|
||||
path.join(__dirname, 'metadata.user.js'),
|
||||
'utf8'
|
||||
);
|
||||
|
||||
esbuild.build({
|
||||
entryPoints: [path.join(__dirname, 'src', 'index.ts')],
|
||||
outfile: path.join(__dirname, 'dist', 'm3u8-download.user.js'),
|
||||
bundle: true,
|
||||
format: 'iife',
|
||||
target: 'es2018',
|
||||
banner: {
|
||||
js: metadata + '\n',
|
||||
},
|
||||
sourcemap: false,
|
||||
minify: false,
|
||||
logLevel: 'info',
|
||||
}).catch(() => process.exit(1));
|
||||
Loading…
Add table
Add a link
Reference in a new issue