mirror of
https://github.com/Eugeny/tabby.git
synced 2025-06-28 07:19:54 +00:00
.
This commit is contained in:
parent
cb6e9243c1
commit
21da3bebfb
@ -27,10 +27,6 @@ if (!process.env.TERMINUS_PLUGINS) {
|
|||||||
process.env.TERMINUS_PLUGINS = ''
|
process.env.TERMINUS_PLUGINS = ''
|
||||||
}
|
}
|
||||||
|
|
||||||
if (process.env.DEV) {
|
|
||||||
process.env.TERMINUS_PLUGINS += `:${path.resolve(__dirname, '..')}`
|
|
||||||
}
|
|
||||||
|
|
||||||
setupWindowManagement = () => {
|
setupWindowManagement = () => {
|
||||||
let windowCloseable
|
let windowCloseable
|
||||||
|
|
||||||
|
@ -12,12 +12,20 @@ function normalizePath (path: string): string {
|
|||||||
};
|
};
|
||||||
|
|
||||||
(<any>global).require.main.paths.map(x => nodeModule.globalPaths.push(normalizePath(x)))
|
(<any>global).require.main.paths.map(x => nodeModule.globalPaths.push(normalizePath(x)))
|
||||||
nodeModule.globalPaths.unshift(
|
|
||||||
path.join(
|
if (process.env.DEV) {
|
||||||
|
nodeModule.globalPaths.unshift(path.dirname(require('electron').remote.app.getAppPath()))
|
||||||
|
}
|
||||||
|
|
||||||
|
nodeModule.globalPaths.unshift(path.join(
|
||||||
path.dirname(require('electron').remote.app.getPath('exe')),
|
path.dirname(require('electron').remote.app.getPath('exe')),
|
||||||
'resources/builtin-plugins/node_modules',
|
'resources/builtin-plugins/node_modules',
|
||||||
)
|
))
|
||||||
)
|
nodeModule.globalPaths.unshift(path.join(
|
||||||
|
require('electron').remote.app.getPath('appData'),
|
||||||
|
'terminus',
|
||||||
|
'plugins',
|
||||||
|
))
|
||||||
|
|
||||||
if (process.env.TERMINUS_PLUGINS) {
|
if (process.env.TERMINUS_PLUGINS) {
|
||||||
process.env.TERMINUS_PLUGINS.split(':').map(x => nodeModule.globalPaths.unshift(normalizePath(x)))
|
process.env.TERMINUS_PLUGINS.split(':').map(x => nodeModule.globalPaths.unshift(normalizePath(x)))
|
||||||
@ -47,6 +55,11 @@ export async function findPlugins (): Promise<IPluginEntry[]> {
|
|||||||
if (!await fs.exists(infoPath)) {
|
if (!await fs.exists(infoPath)) {
|
||||||
continue
|
continue
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (foundPlugins.some(x => x.name === pluginName)) {
|
||||||
|
console.info(`Plugin ${pluginName} already exists`)
|
||||||
|
}
|
||||||
|
|
||||||
try {
|
try {
|
||||||
foundPlugins.push({
|
foundPlugins.push({
|
||||||
name: pluginName,
|
name: pluginName,
|
||||||
|
Loading…
x
Reference in New Issue
Block a user