2017-08-15 13:54:22 +02:00
|
|
|
// USE CASE | TARGET SERVER | HTML FILE | BUILD COMMAND
|
2018-12-21 13:29:35 +01:00
|
|
|
// local | location.hostname | index.html | node make
|
|
|
|
// local app | local IP address | app.html | node make
|
|
|
|
// local test | test.tutanota.com | index.html | node make test
|
|
|
|
// local test app | test.tutanota.com | app.html | node make test
|
|
|
|
// local prod | mail.tutanota.com | index.html | node make prod
|
|
|
|
// local prod app | mail.tutanota.com | app.html | node make prod
|
|
|
|
// local desktop | location.hostname | desktop.html | node make -d
|
|
|
|
// local test | test.tutanota.com | index.html | node make test
|
|
|
|
// local test app | test.tutanota.com | app.html | node make test
|
|
|
|
// test desktop | test.tutanota.com | desktop.html | node make -d test
|
|
|
|
// local prod | mail.tutanota.com | index.html | node make prod
|
|
|
|
// prod desktop | mail.tutanota.com | desktop.html | node make -d prod
|
2018-09-25 16:59:26 +02:00
|
|
|
|
2018-12-21 13:29:35 +01:00
|
|
|
// test and prod dist | location.hostname | index.html | node dist
|
|
|
|
// local app dist | local IP address | app.html | node dist local
|
|
|
|
// local test dist | test.tutanota.com | index.html | node dist test
|
|
|
|
// test app dist | test.tutanota.com | app.html | node dist test
|
|
|
|
// test desktop dist | test.tutanota.com | desktop.html | node dist -l test
|
|
|
|
// local prod dist | mail.tutanota.com | index.html | node dist prod
|
|
|
|
// prod app dist | mail.tutanota.com | app.html | node dist prod
|
|
|
|
// prod desktop dist | mail.tutanota.com | desktop.html | node -l dist
|
2017-08-15 13:54:22 +02:00
|
|
|
|
|
|
|
// Attention: The contents of this file is evaluated at compile time and not at runtime
|
2019-09-13 13:49:11 +02:00
|
|
|
export function create(staticUrl, version, mode, dist) {
|
2017-08-15 13:54:22 +02:00
|
|
|
return {
|
|
|
|
"staticUrl": staticUrl,
|
|
|
|
"mode": mode != null ? mode : "Browser",
|
|
|
|
"versionNumber": version,
|
|
|
|
"dist": dist != null ? dist : false,
|
|
|
|
"timeout": 20000,
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2019-09-13 13:49:11 +02:00
|
|
|
export function preludeEnvPlugin(env) {
|
|
|
|
return {
|
|
|
|
name: "prelude-env",
|
|
|
|
banner() {
|
2021-02-23 17:52:24 +01:00
|
|
|
return `globalThis.env = ${JSON.stringify(env, null, 2)};`
|
2019-09-13 13:49:11 +02:00
|
|
|
}
|
|
|
|
}
|
2017-08-15 13:54:22 +02:00
|
|
|
}
|