plugins dir

This commit is contained in:
Jan Prochazka 2021-04-15 17:41:35 +02:00
parent 4dfaf1346e
commit 1cc955f997
4 changed files with 10 additions and 4 deletions

2
.gitignore vendored
View File

@ -13,8 +13,10 @@ build
dist
app/packages/web/public
app/packages/plugins
docker/public
docker/bundle.js
docker/plugins
# misc
.DS_Store

View File

@ -71,7 +71,7 @@
"build": "cd ../packages/api && yarn build && cd ../web && yarn build && cd ../../app && yarn dist",
"build:local": "cd ../packages/api && yarn build && cd ../web && yarn build && cd ../../app && yarn predist",
"postinstall": "electron-builder install-app-deps",
"predist": "copyfiles ../packages/api/dist/* packages && copyfiles \"../packages/web/public/*\" packages && copyfiles \"../packages/web/public/**/*\" packages && copyup \"../plugins/dist/**\" packages"
"predist": "copyfiles ../packages/api/dist/* packages && copyfiles \"../packages/web/public/*\" packages && copyfiles \"../packages/web/public/**/*\" packages && copyfiles --up 3 \"../plugins/dist/**/*\" packages/plugins"
},
"main": "src/electron.js",
"devDependencies": {

View File

@ -33,8 +33,8 @@
"fillNativeModules": "node fillNativeModules",
"fillNativeModulesElectron": "node fillNativeModules --eletron",
"prettier": "prettier --write packages/api/src && prettier --write packages/datalib/src && prettier --write packages/filterparser/src && prettier --write packages/sqltree/src && prettier --write packages/tools/src && prettier --write packages/types && prettier --write packages/web/src && prettier --write app/src",
"copy:docker:build": "copyfiles packages/api/dist/* docker -f && copyfiles packages/web/public/* docker -u 2 && copyfiles \"packages/web/public/**/*\" docker -u 2",
"prepare:docker": "yarn build:web:docker && yarn build:api && yarn copy:docker:build",
"copy:docker:build": "copyfiles packages/api/dist/* docker -f && copyfiles packages/web/public/* docker -u 2 && copyfiles \"packages/web/public/**/*\" docker -u 2 && copyfiles \"plugins/dist/**/*\" docker/plugins -u 2",
"prepare:docker": "yarn plugins:copydist && yarn build:web:docker && yarn build:api && yarn copy:docker:build",
"prepare": "yarn build:lib",
"start": "concurrently --kill-others-on-fail \"yarn start:api\" \"yarn start:web\"",
"lib": "concurrently --kill-others-on-fail \"yarn start:sqltree\" \"yarn start:filterparser\" \"yarn start:datalib\" \"yarn start:tools\" \"yarn build:plugins:frontend:watch\"",

View File

@ -3,6 +3,7 @@ const path = require('path');
const fs = require('fs');
const cleanDirectory = require('./cleanDirectory');
const _isRunOnSource = require('./_isRunOnSource');
const platformInfo = require('./platformInfo');
const createDirectories = {};
const ensureDirectory = (dir, clean) => {
@ -44,7 +45,10 @@ function packagedPluginsDir() {
if (_isRunOnSource()) {
return path.resolve(__dirname, '../../../../plugins');
}
return path.resolve(__dirname, '../../plugins/dist');
if (platformInfo.isDocker) {
return path.resolve(__dirname, 'plugins');
}
return path.resolve(__dirname, '../../plugins');
}
module.exports = {