-
-
Notifications
You must be signed in to change notification settings - Fork 63
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feature/self contained desktop package (#439)
* Bundle yargs and fs-extra into desktop/bin/dump_artifacts.js but leave pyodide and node-fetch as externals because they must be necessarily installed at runtime anyway as the Wasm files shipped with pyodide are used at runtime and node-fetch is one of the dependencies of the pyodide package * Create scripts/build_bin.js
- Loading branch information
Showing
2 changed files
with
26 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
#!/usr/bin/env node | ||
|
||
// Build script using esbuild like https://esbuild.github.io/getting-started/#build-scripts | ||
|
||
require("esbuild") | ||
.build({ | ||
entryPoints: ["./bin/dump_artifacts.ts"], | ||
bundle: true, | ||
minify: true, | ||
platform: "node", | ||
external: [ | ||
"@stlite/kernel", // Don't touch `require.resolve("@stlite/kernel") at the bundle time. | ||
"pyodide", // The `pyodide` package must be installed at runtime for the included Wasm files, so there is no reason to bundle it here. | ||
"node-fetch", // `node-fetch` will be installed at runtime anyway because it is one dependency of the `pyodide` package, so there is no reason to bundle it here. | ||
], | ||
outfile: "./bin/dump_artifacts.js", | ||
logLevel: "info", | ||
}) | ||
.catch(() => process.exit(1)); |