diff options
author | Sebastian <sebasjm@gmail.com> | 2023-05-05 08:35:28 -0300 |
---|---|---|
committer | Sebastian <sebasjm@gmail.com> | 2023-05-05 08:52:57 -0300 |
commit | d61e4fa7196f20717166a2744f8ea3a77cc4addb (patch) | |
tree | d73d698a7ac53559bd47aa60530fc2645c2f47e3 /packages/anastasis-webui/dev.mjs | |
parent | 6340cc5454f637a97fb7329d2494c1dfc3fb1735 (diff) | |
download | wallet-core-d61e4fa7196f20717166a2744f8ea3a77cc4addb.tar.xz |
upgrade to now build from web-utils
Diffstat (limited to 'packages/anastasis-webui/dev.mjs')
-rwxr-xr-x | packages/anastasis-webui/dev.mjs | 29 |
1 files changed, 19 insertions, 10 deletions
diff --git a/packages/anastasis-webui/dev.mjs b/packages/anastasis-webui/dev.mjs index 0446603dc..f5f66c77f 100755 --- a/packages/anastasis-webui/dev.mjs +++ b/packages/anastasis-webui/dev.mjs @@ -15,17 +15,26 @@ GNU Anastasis; 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, getFilesInDirectory } from "@gnu-taler/web-util/build"; -buildConfig.inject = ['./node_modules/@gnu-taler/web-util/lib/live-reload.mjs'] +const allTestFiles = getFilesInDirectory("src", /.test.tsx?$/); +const devEntryPoints = ["src/stories.tsx", "src/index.ts", ...allTestFiles]; + +const build = initializeDev({ + source: { + js: devEntryPoints, + assets: ["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, +}); |