using env prop

This commit is contained in:
Sebastian 2023-06-01 09:29:08 -03:00
parent 2332101482
commit b4966b33f4
No known key found for this signature in database
GPG Key ID: 173909D1A5F66069
15 changed files with 18 additions and 19 deletions

View File

@ -17,6 +17,7 @@
import { build } from "@gnu-taler/web-util/build"; import { build } from "@gnu-taler/web-util/build";
await build({ await build({
type: "production",
source: { source: {
js: ["src/index.ts"], js: ["src/index.ts"],
assets: ["src/index.html"], assets: ["src/index.html"],

View File

@ -21,6 +21,7 @@ import { initializeDev } from "@gnu-taler/web-util/build";
const devEntryPoints = ["src/stories.tsx", "src/index.ts"]; const devEntryPoints = ["src/stories.tsx", "src/index.ts"];
const build = initializeDev({ const build = initializeDev({
type: "development",
source: { source: {
js: devEntryPoints, js: devEntryPoints,
assets: ["src/index.html"], assets: ["src/index.html"],

View File

@ -20,6 +20,7 @@ import { getFilesInDirectory } from "@gnu-taler/web-util/build";
const allTestFiles = getFilesInDirectory("src", /.test.tsx?$/); const allTestFiles = getFilesInDirectory("src", /.test.tsx?$/);
await build({ await build({
type: "test",
source: { source: {
js: allTestFiles, js: allTestFiles,
assets: ["src/index.html"], assets: ["src/index.html"],

View File

@ -18,6 +18,7 @@
import { build } from "@gnu-taler/web-util/build"; import { build } from "@gnu-taler/web-util/build";
await build({ await build({
type: "production",
source: { source: {
js: ["src/index.tsx"], js: ["src/index.tsx"],
assets: ["src/index.html"], assets: ["src/index.html"],

View File

@ -21,6 +21,7 @@ import { initializeDev } from "@gnu-taler/web-util/build";
const devEntryPoints = ["src/stories.tsx", "src/index.tsx"]; const devEntryPoints = ["src/stories.tsx", "src/index.tsx"];
const build = initializeDev({ const build = initializeDev({
type: "development",
source: { source: {
js: devEntryPoints, js: devEntryPoints,
assets: ["src/index.html"], assets: ["src/index.html"],

View File

@ -21,6 +21,7 @@ import { getFilesInDirectory } from "@gnu-taler/web-util/build";
const allTestFiles = getFilesInDirectory("src", /.test.tsx?$/); const allTestFiles = getFilesInDirectory("src", /.test.tsx?$/);
await build({ await build({
type: "test",
source: { source: {
js: allTestFiles, js: allTestFiles,
assets: ["src/index.html"], assets: ["src/index.html"],

View File

@ -18,6 +18,7 @@
import { build } from "@gnu-taler/web-util/build"; import { build } from "@gnu-taler/web-util/build";
await build({ await build({
type: "production",
source: { source: {
js: ["src/index.tsx"], js: ["src/index.tsx"],
assets: ["src/index.html"], assets: ["src/index.html"],

View File

@ -21,6 +21,7 @@ import { initializeDev } from "@gnu-taler/web-util/build";
const devEntryPoints = ["src/stories.tsx", "src/index.tsx"]; const devEntryPoints = ["src/stories.tsx", "src/index.tsx"];
const build = initializeDev({ const build = initializeDev({
type: "development",
source: { source: {
js: devEntryPoints, js: devEntryPoints,
assets: ["src/index.html"], assets: ["src/index.html"],

View File

@ -21,6 +21,7 @@ import { getFilesInDirectory } from "@gnu-taler/web-util/build";
const allTestFiles = getFilesInDirectory("./src", /.test.tsx?$/); const allTestFiles = getFilesInDirectory("./src", /.test.tsx?$/);
await build({ await build({
type: "test",
source: { source: {
js: allTestFiles, js: allTestFiles,
assets: ["src/index.html"], assets: ["src/index.html"],

View File

@ -18,6 +18,7 @@
import { build } from "@gnu-taler/web-util/build"; import { build } from "@gnu-taler/web-util/build";
await build({ await build({
type: "production",
source: { source: {
js: ["src/index.tsx"], js: ["src/index.tsx"],
assets: ["src/index.html"], assets: ["src/index.html"],

View File

@ -21,6 +21,7 @@ import { initializeDev } from "@gnu-taler/web-util/build";
const devEntryPoints = ["src/stories.tsx", "src/index.tsx"]; const devEntryPoints = ["src/stories.tsx", "src/index.tsx"];
const build = initializeDev({ const build = initializeDev({
type: "development",
source: { source: {
js: devEntryPoints, js: devEntryPoints,
assets: ["src/index.html"], assets: ["src/index.html"],

View File

@ -21,6 +21,7 @@ import { getFilesInDirectory } from "@gnu-taler/web-util/build";
const allTestFiles = getFilesInDirectory("src", /.test.tsx?$/); const allTestFiles = getFilesInDirectory("src", /.test.tsx?$/);
await build({ await build({
type: "test",
source: { source: {
js: allTestFiles, js: allTestFiles,
assets: ["src/index.html"], assets: ["src/index.html"],

View File

@ -18,9 +18,8 @@
import linaria from "@linaria/esbuild"; import linaria from "@linaria/esbuild";
import { build, getFilesInDirectory } from "@gnu-taler/web-util/build"; import { build, getFilesInDirectory } from "@gnu-taler/web-util/build";
const allStaticFiles = getFilesInDirectory("static");
await build({ await build({
type: "production",
source: { source: {
js: [ js: [
"src/popupEntryPoint.tsx", "src/popupEntryPoint.tsx",
@ -30,7 +29,6 @@ await build({
"src/taler-wallet-interaction-support.ts", "src/taler-wallet-interaction-support.ts",
"src/browserWorkerEntry.ts", "src/browserWorkerEntry.ts",
], ],
assets: allStaticFiles,
}, },
destination: "./dist/prod", destination: "./dist/prod",
css: "linaria", css: "linaria",

View File

@ -32,6 +32,7 @@ const devEntryPoints = [
]; ];
const build = initializeDev({ const build = initializeDev({
type: "development",
source: { source: {
js: devEntryPoints, js: devEntryPoints,
assets: allStaticFiles, assets: allStaticFiles,

View File

@ -15,30 +15,18 @@
GNU Taler; see the file COPYING. If not, see <http://www.gnu.org/licenses/> GNU Taler; see the file COPYING. If not, see <http://www.gnu.org/licenses/>
*/ */
import linaria from "@linaria/esbuild";
import { build, getFilesInDirectory } from "@gnu-taler/web-util/build"; import { build, getFilesInDirectory } from "@gnu-taler/web-util/build";
const allTestFiles = getFilesInDirectory("src", /.test.tsx?$/); const allTestFiles = getFilesInDirectory("src", /.test.tsx?$/);
const allStaticFiles = getFilesInDirectory("static");
await build({ await build({
type: "test",
source: { source: {
js: allTestFiles, js: allTestFiles,
assets: allStaticFiles, assets: [],
}, },
destination: "./dist/test", destination: "./dist/test",
css: "linaria", css: "linaria",
linariaPlugin: () => { // no need to produce css
// linaria has a bug if this run in web-util library // linariaPlugin: () => {},
return linaria({
babelOptions: {
presets: [
"@babel/preset-typescript",
"@babel/preset-react",
"@linaria",
],
},
sourceMap: true,
});
},
}); });