enso/app/ide-desktop/lib/client/bundle.ts
Michał Wawrzyniec Urbańczyk ee981d2052
Reworked ide watch and ide start commands (#5634)
This PR changes build script's `ide watch` and `ide start` commands, so they don't use `electron-builder` to package. Instead, they invoke `electron` directly, significantly reducing time overhead.

`ide watch` will now start Electron process, while continuously rebuilding gui and the client in the background. Changes can be puilled by reloading within the electron, or closing the electron and letting it start once again. To stop, the script should be interrupted with `Ctrl+C`.
2023-03-02 23:00:47 +01:00

15 lines
462 B
TypeScript

/** Script that bundles JS client code. */
import path, { dirname } from 'node:path'
import esbuild from 'esbuild'
import { bundlerOptionsFromEnv } from './esbuild-config.js'
import { fileURLToPath } from 'node:url'
export const thisPath = path.resolve(dirname(fileURLToPath(import.meta.url)))
// ================
// === Bundling ===
// ================
const bundlerOptions: esbuild.BuildOptions = bundlerOptionsFromEnv()
await esbuild.build(bundlerOptions)