From 71f7a705c43c96e90552eaa7d8a0c53a980df8e4 Mon Sep 17 00:00:00 2001 From: Jan Prochazka Date: Thu, 1 Apr 2021 13:52:28 +0200 Subject: [PATCH] fixed dbgate npm edition --- packages/api/src/main.js | 2 +- packages/web/package.json | 10 ++++++---- 2 files changed, 7 insertions(+), 5 deletions(-) diff --git a/packages/api/src/main.js b/packages/api/src/main.js index 4592c8c8..4a41b2ab 100644 --- a/packages/api/src/main.js +++ b/packages/api/src/main.js @@ -100,7 +100,7 @@ function start(argument = null) { }); }); } else if (argument == 'startNodeWeb') { - app.use(express.static(path.join(__dirname, '../../dbgate-web/build'))); + app.use(express.static(path.join(__dirname, '../../dbgate-web/public'))); findFreePort(5000, function (err, port) { server.listen(port, () => { console.log(`DbGate API listening on port ${port}`); diff --git a/packages/web/package.json b/packages/web/package.json index d711ad5c..58aacbd5 100644 --- a/packages/web/package.json +++ b/packages/web/package.json @@ -4,9 +4,12 @@ "scripts": { "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" + "validate": "svelte-check", + "prepublishOnly": "yarn build" }, + "files": [ + "public" + ], "devDependencies": { "@ant-design/colors": "^5.0.0", "@rollup/plugin-commonjs": "^17.0.0", @@ -42,9 +45,8 @@ "@mdi/font": "^5.9.55", "file-selector": "^0.2.4", "resize-observer-polyfill": "^1.5.1", - "sirv-cli": "^1.0.0", "svelte-json-tree": "^0.1.0", "svelte-markdown": "^0.1.4", "svelte-select": "^3.17.0" } -} +} \ No newline at end of file