mirror of
https://github.com/appwrite/console.git
synced 2026-11-18 20:47:21 +00:00
feat: build informations
This commit is contained in:
1 parent
8df09cc1fb
commit
469e44b2cf
3 files changed
+39
-1
No files matched your search
@@ -0,0 +1,36 @@
|
||||
import { fileURLToPath } from 'url';
|
||||
import { build, loadEnv } from 'vite';
|
||||
import kleur from 'kleur';
|
||||
|
||||
const { bold, yellow } = kleur;
|
||||
const __dirname = fileURLToPath(new URL('.', import.meta.url));
|
||||
const env = loadEnv('production', __dirname);
|
||||
|
||||
function log(text = '', prefix = '') {
|
||||
console.log(`${bold().green(`# ${prefix}`)}${text}`);
|
||||
}
|
||||
|
||||
function logEnv(key, value, fallback) {
|
||||
log(value || yellow(fallback), `${key}: `);
|
||||
}
|
||||
|
||||
function logDelimiter() {
|
||||
console.log(bold().green('#'.repeat(80)));
|
||||
}
|
||||
|
||||
async function main() {
|
||||
logDelimiter();
|
||||
log();
|
||||
log(bold().magenta('APPWRITE CONSOLE'));
|
||||
log();
|
||||
logEnv('CONSOLE MODE', env?.VITE_CONSOLE_MODE, 'not set');
|
||||
logEnv('APPWRITE ENDPOINT', env?.VITE_APPWRITE_ENDPOINT, 'relative');
|
||||
logEnv('GROWTH ENDPOINT', env?.VITE_APPWRITE_GROWTH_ENDPOINT, 'not set');
|
||||
logEnv('GOOGLE ANALYTICS', env?.VITE_GA_PROJECT, 'not set');
|
||||
logEnv('SENTRY DSN', env?.VITE_GA_PROJECT, 'not set');
|
||||
log();
|
||||
logDelimiter();
|
||||
await build();
|
||||
}
|
||||
|
||||
main();
|
||||
Generated
+1
@@ -39,6 +39,7 @@
|
||||
"eslint-config-prettier": "^8.8.0",
|
||||
"eslint-plugin-svelte3": "^4.0.0",
|
||||
"jsdom": "^21.1.1",
|
||||
"kleur": "^4.1.5",
|
||||
"pre-commit": "^1.2.2",
|
||||
"prettier": "^2.8.6",
|
||||
"prettier-plugin-svelte": "^2.9.0",
|
||||
|
||||
+2
-1
@@ -5,7 +5,7 @@
|
||||
},
|
||||
"scripts": {
|
||||
"dev": "vite dev",
|
||||
"build": "vite build",
|
||||
"build": "node build.js",
|
||||
"preview": "vite preview",
|
||||
"sync": "svelte-kit sync",
|
||||
"check": "svelte-check --tsconfig ./tsconfig.json --fail-on-warnings --threshold warning",
|
||||
@@ -50,6 +50,7 @@
|
||||
"eslint-config-prettier": "^8.8.0",
|
||||
"eslint-plugin-svelte3": "^4.0.0",
|
||||
"jsdom": "^21.1.1",
|
||||
"kleur": "^4.1.5",
|
||||
"pre-commit": "^1.2.2",
|
||||
"prettier": "^2.8.6",
|
||||
"prettier-plugin-svelte": "^2.9.0",
|
||||
|
||||
Reference in new issue
Block a user