diff options
author | Sebastian <sebasjm@gmail.com> | 2022-03-25 16:57:27 -0300 |
---|---|---|
committer | Sebastian <sebasjm@gmail.com> | 2022-03-25 16:58:00 -0300 |
commit | ddfb40e50cef0abddc7690b23562b1ca5aeb3fdd (patch) | |
tree | 231427a713e86b5fbdcdbc8cbcfc8b6c00392170 /packages/taler-wallet-webextension/serve-esbuild.mjs | |
parent | 00fb648269c166c4995b38fe640748834fac7b18 (diff) | |
download | wallet-core-ddfb40e50cef0abddc7690b23562b1ca5aeb3fdd.tar.xz |
new dev environment
Diffstat (limited to 'packages/taler-wallet-webextension/serve-esbuild.mjs')
-rw-r--r-- | packages/taler-wallet-webextension/serve-esbuild.mjs | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/packages/taler-wallet-webextension/serve-esbuild.mjs b/packages/taler-wallet-webextension/serve-esbuild.mjs new file mode 100644 index 000000000..0fa2723ae --- /dev/null +++ b/packages/taler-wallet-webextension/serve-esbuild.mjs @@ -0,0 +1,22 @@ + +import linaria from '@linaria/esbuild' +import esbuild from 'esbuild' +import { buildConfig } from "./build-fast-with-linaria.mjs" +import fs from 'fs'; + +fs.writeFileSync("dev-html/manifest.json", fs.readFileSync("manifest-v2.json")) +fs.writeFileSync("dev-html/mocha.css", fs.readFileSync("node_modules/mocha/mocha.css")) +fs.writeFileSync("dev-html/mocha.js", fs.readFileSync("node_modules/mocha/mocha.js")) +fs.writeFileSync("dev-html/mocha.js.map", fs.readFileSync("node_modules/mocha/mocha.js.map")) + +const server = await esbuild + .serve({ + servedir: 'dev-html', + }, { ...buildConfig, outdir: 'dev-html/dist' }) + .catch((e) => { + console.log(e) + process.exit(1) + }); + +console.log("ready!", server.port); + |