using env prop
This commit is contained in:
parent
2332101482
commit
b4966b33f4
@ -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"],
|
||||||
|
@ -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"],
|
||||||
|
@ -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"],
|
||||||
|
@ -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"],
|
||||||
|
@ -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"],
|
||||||
|
@ -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"],
|
||||||
|
@ -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"],
|
||||||
|
@ -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"],
|
||||||
|
@ -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"],
|
||||||
|
@ -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"],
|
||||||
|
@ -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"],
|
||||||
|
@ -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"],
|
||||||
|
@ -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",
|
||||||
|
@ -32,6 +32,7 @@ const devEntryPoints = [
|
|||||||
];
|
];
|
||||||
|
|
||||||
const build = initializeDev({
|
const build = initializeDev({
|
||||||
|
type: "development",
|
||||||
source: {
|
source: {
|
||||||
js: devEntryPoints,
|
js: devEntryPoints,
|
||||||
assets: allStaticFiles,
|
assets: allStaticFiles,
|
||||||
|
@ -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,
|
|
||||||
});
|
|
||||||
},
|
|
||||||
});
|
});
|
||||||
|
Loading…
Reference in New Issue
Block a user