chore: bundle open's xdg-open script (#23710)

This commit is contained in:
Max Schmitt 2023-06-14 20:49:26 +02:00 committed by GitHub
parent dc81cfaf81
commit 60de8308a8
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 7 additions and 0 deletions

View File

@ -9,6 +9,7 @@
!lib/**/*.html
!lib/**/*.png
!lib/**/*.ttf
!lib/xdg-open
# Exclude injected files. A preprocessed version of these is included via lib/generated.
# See src/server/injected/README.md.
lib/**/injected/

View File

@ -17,6 +17,12 @@
// @ts-check
const path = require('path');
const esbuild = require('esbuild');
const fs = require('fs');
{
// 'open' package requires 'xdg-open' script to be present, which does not get bundled by esbuild.
fs.copyFileSync(path.join(__dirname, 'node_modules/open/xdg-open'), path.join(__dirname, '../../lib/xdg-open'));
}
esbuild.build({
entryPoints: [path.join(__dirname, 'src/utilsBundleImpl.ts')],