mirror of
https://github.com/DeNNiiInc/dbgate.git
synced 2026-04-22 07:36:01 +00:00
wokring electron app build + simplified web build
This commit is contained in:
@@ -2,8 +2,8 @@
|
||||
"name": "dbgate-web",
|
||||
"version": "1.0.0",
|
||||
"scripts": {
|
||||
"build": "rollup -c",
|
||||
"dev": "rollup -c -w",
|
||||
"build": "cross-env API_URL=ORIGIN rollup -c",
|
||||
"dev": "cross-env API_URL=http://localhost:3000 rollup -c -w",
|
||||
"start": "sirv public",
|
||||
"validate": "svelte-check"
|
||||
},
|
||||
@@ -11,10 +11,12 @@
|
||||
"@ant-design/colors": "^5.0.0",
|
||||
"@rollup/plugin-commonjs": "^17.0.0",
|
||||
"@rollup/plugin-node-resolve": "^11.0.0",
|
||||
"@rollup/plugin-replace": "^2.4.1",
|
||||
"@rollup/plugin-typescript": "^6.0.0",
|
||||
"@tsconfig/svelte": "^1.0.0",
|
||||
"ace-builds": "^1.4.8",
|
||||
"chart.js": "^2.9.4",
|
||||
"cross-env": "^7.0.3",
|
||||
"dbgate-datalib": "^3.9.5",
|
||||
"dbgate-sqltree": "^3.9.5",
|
||||
"dbgate-tools": "^3.9.5",
|
||||
|
||||
@@ -10,17 +10,17 @@
|
||||
<meta name="description"
|
||||
content="DbGate - web based opensource database administration tool for MS SQL, MySQL, Postgre SQL" />
|
||||
|
||||
<link rel='icon' type='image/png' href='/favicon.ico'>
|
||||
<link rel="manifest" href="/manifest.json" />
|
||||
<link rel='icon' type='image/png' href='favicon.ico'>
|
||||
<link rel="manifest" href="manifest.json" />
|
||||
|
||||
<link rel='stylesheet' href='/global.css'>
|
||||
<link rel='stylesheet' href='/dimensions.css'>
|
||||
<link rel='stylesheet' href='/bulma.css'>
|
||||
<link rel='stylesheet' href='/icon-colors.css'>
|
||||
<link rel='stylesheet' href='/build/bundle.css'>
|
||||
<link rel='stylesheet' href='/build/fonts/materialdesignicons.css'>
|
||||
<link rel='stylesheet' href='global.css'>
|
||||
<link rel='stylesheet' href='dimensions.css'>
|
||||
<link rel='stylesheet' href='bulma.css'>
|
||||
<link rel='stylesheet' href='icon-colors.css'>
|
||||
<link rel='stylesheet' href='build/bundle.css'>
|
||||
<link rel='stylesheet' href='build/fonts/materialdesignicons.css'>
|
||||
|
||||
<script defer src='/build/bundle.js'></script>
|
||||
<script defer src='build/bundle.js'></script>
|
||||
</head>
|
||||
|
||||
<body>
|
||||
|
||||
15
packages/web/public/unknown.svg
Normal file
15
packages/web/public/unknown.svg
Normal file
@@ -0,0 +1,15 @@
|
||||
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||
<!-- Created with Inkscape (http://www.inkscape.org/) -->
|
||||
<svg xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:cc="http://creativecommons.org/ns#" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:svg="http://www.w3.org/2000/svg" xmlns="http://www.w3.org/2000/svg" version="1.1" width="116" height="116" id="svg2">
|
||||
<defs id="defs4"/>
|
||||
<metadata id="metadata7">
|
||||
<rdf:RDF>
|
||||
<cc:Work rdf:about="">
|
||||
<dc:format>image/svg+xml</dc:format>
|
||||
<dc:type rdf:resource="http://purl.org/dc/dcmitype/StillImage"/>
|
||||
<dc:title/>
|
||||
</cc:Work>
|
||||
</rdf:RDF>
|
||||
</metadata>
|
||||
<text x="10.710938" y="111.5" id="text2996" xml:space="preserve" style="font-size:144px;font-style:normal;font-weight:normal;line-height:125%;letter-spacing:0px;word-spacing:0px;fill:#000000;fill-opacity:1;stroke:none;font-family:Sans;-inkscape-font-specification:Sans"><tspan x="10.710938" y="111.5" id="tspan2998" style="font-size:150px;font-style:normal;font-variant:normal;font-weight:bold;font-stretch:normal;font-family:Arial;-inkscape-font-specification:Arial Bold">?</tspan></text>
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 1.1 KiB |
@@ -6,6 +6,7 @@ import copy from 'rollup-plugin-copy';
|
||||
import { terser } from 'rollup-plugin-terser';
|
||||
import sveltePreprocess from 'svelte-preprocess';
|
||||
import typescript from '@rollup/plugin-typescript';
|
||||
import replace from '@rollup/plugin-replace';
|
||||
import css from 'rollup-plugin-css-only';
|
||||
|
||||
const production = !process.env.ROLLUP_WATCH;
|
||||
@@ -43,16 +44,18 @@ export default {
|
||||
copy({
|
||||
targets: [
|
||||
{
|
||||
src:
|
||||
'../../node_modules/@mdi/font/css/materialdesignicons.css',
|
||||
src: '../../node_modules/@mdi/font/css/materialdesignicons.css',
|
||||
dest: 'public/build/fonts/',
|
||||
},
|
||||
{
|
||||
src:
|
||||
'../../node_modules/@mdi/font/fonts/*',
|
||||
dest: 'public/build/fonts/',
|
||||
},
|
||||
],
|
||||
src: '../../node_modules/@mdi/font/fonts/*',
|
||||
dest: 'public/build/fonts/',
|
||||
},
|
||||
],
|
||||
}),
|
||||
|
||||
replace({
|
||||
'process.env.API_URL': JSON.stringify(process.env.API_URL),
|
||||
}),
|
||||
|
||||
svelte({
|
||||
|
||||
@@ -12,8 +12,7 @@ export function extractPluginIcon(packageManifest) {
|
||||
return `https://raw.githubusercontent.com/${match[1]}/${match[2]}/master/icon.svg`;
|
||||
}
|
||||
}
|
||||
// eslint-disable-next-line no-undef
|
||||
return `${process.env.PUBLIC_URL}/unknown.svg`;
|
||||
return 'unknown.svg';
|
||||
}
|
||||
|
||||
export function extractPluginAuthor(packageManifest) {
|
||||
|
||||
@@ -1,3 +1,8 @@
|
||||
let apiUrl = null;
|
||||
try {
|
||||
apiUrl = process.env.API_URL;
|
||||
} catch {}
|
||||
|
||||
export default function resolveApi() {
|
||||
if (window['require']) {
|
||||
const electron = window['require']('electron');
|
||||
@@ -10,12 +15,8 @@ export default function resolveApi() {
|
||||
}
|
||||
}
|
||||
|
||||
// // eslint-disable-next-line
|
||||
// const apiUrl = process.env.REACT_APP_API_URL;
|
||||
// if (apiUrl) {
|
||||
// if (apiUrl == 'ORIGIN') return window.location.origin;
|
||||
// return apiUrl;
|
||||
// }
|
||||
|
||||
return 'http://localhost:3000';
|
||||
if (apiUrl) {
|
||||
return apiUrl;
|
||||
}
|
||||
return window.location.origin;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user