diff options
Diffstat (limited to 'packages/merchant-backoffice-ui/dev.mjs')
-rwxr-xr-x | packages/merchant-backoffice-ui/dev.mjs | 30 |
1 files changed, 20 insertions, 10 deletions
diff --git a/packages/merchant-backoffice-ui/dev.mjs b/packages/merchant-backoffice-ui/dev.mjs index 35a9fa16c..6cc99add0 100755 --- a/packages/merchant-backoffice-ui/dev.mjs +++ b/packages/merchant-backoffice-ui/dev.mjs @@ -1,7 +1,7 @@ #!/usr/bin/env node /* This file is part of GNU Taler - (C) 2022 Taler Systems S.A. + (C) 2021-2023 Taler Systems S.A. GNU Taler is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software @@ -15,16 +15,26 @@ GNU Taler; see the file COPYING. If not, see <http://www.gnu.org/licenses/> */ -import { serve } from "@gnu-taler/web-util/lib/index.node"; -import esbuild from "esbuild"; -import { buildConfig } from "./build.mjs"; +import { serve } from "@gnu-taler/web-util/node"; +import { initializeDev } from "@gnu-taler/web-util/build"; -buildConfig.inject = ['./node_modules/@gnu-taler/web-util/lib/live-reload.mjs'] +const devEntryPoints = ["src/stories.tsx", "src/index.tsx"]; + +const build = initializeDev({ + type: "development", + source: { + js: devEntryPoints, + assets: [{base:"src",files:["src/index.html"]}], + }, + css: "sass", + destination: "./dist/dev", +}); + +await build(); serve({ - folder: './dist', + folder: "./dist/dev", port: 8080, - source: './src', - development: true, - onUpdate: async () => esbuild.build(buildConfig) -}) + source: "./src", + onSourceUpdate: build, +}); |