mirror of
https://github.com/Eugeny/tabby.git
synced 2025-06-09 14:00:03 +00:00
fixed #649
This commit is contained in:
parent
168e6f17dc
commit
9cdcc8d8e5
@ -16,11 +16,11 @@ function normalizePath (path: string): string {
|
|||||||
|
|
||||||
nodeRequire.main.paths.map(x => nodeModule.globalPaths.push(normalizePath(x)))
|
nodeRequire.main.paths.map(x => nodeModule.globalPaths.push(normalizePath(x)))
|
||||||
|
|
||||||
if (process.env.DEV) {
|
if (process.env.TERMINUS_DEV) {
|
||||||
nodeModule.globalPaths.unshift(path.dirname(require('electron').remote.app.getAppPath()))
|
nodeModule.globalPaths.unshift(path.dirname(require('electron').remote.app.getAppPath()))
|
||||||
}
|
}
|
||||||
|
|
||||||
const builtinPluginsPath = process.env.DEV ? path.dirname(require('electron').remote.app.getAppPath()) : path.join((process as any).resourcesPath, 'builtin-plugins')
|
const builtinPluginsPath = process.env.TERMINUS_DEV ? path.dirname(require('electron').remote.app.getAppPath()) : path.join((process as any).resourcesPath, 'builtin-plugins')
|
||||||
|
|
||||||
const userPluginsPath = path.join(
|
const userPluginsPath = path.join(
|
||||||
require('electron').remote.app.getPath('appData'),
|
require('electron').remote.app.getPath('appData'),
|
||||||
|
@ -9,7 +9,7 @@ module.exports = {
|
|||||||
preload: path.resolve(__dirname, 'src/entry.preload.ts'),
|
preload: path.resolve(__dirname, 'src/entry.preload.ts'),
|
||||||
bundle: path.resolve(__dirname, 'src/entry.ts'),
|
bundle: path.resolve(__dirname, 'src/entry.ts'),
|
||||||
},
|
},
|
||||||
mode: process.env.DEV ? 'development' : 'production',
|
mode: process.env.TERMINUS_DEV ? 'development' : 'production',
|
||||||
optimization:{
|
optimization:{
|
||||||
minimize: false,
|
minimize: false,
|
||||||
},
|
},
|
||||||
|
@ -7,7 +7,7 @@ module.exports = {
|
|||||||
entry: {
|
entry: {
|
||||||
main: path.resolve(__dirname, 'lib/index.ts'),
|
main: path.resolve(__dirname, 'lib/index.ts'),
|
||||||
},
|
},
|
||||||
mode: process.env.DEV ? 'development' : 'production',
|
mode: process.env.TERMINUS_DEV ? 'development' : 'production',
|
||||||
context: __dirname,
|
context: __dirname,
|
||||||
devtool: 'source-map',
|
devtool: 'source-map',
|
||||||
output: {
|
output: {
|
||||||
|
@ -127,9 +127,9 @@
|
|||||||
},
|
},
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"build": "webpack --color --config app/webpack.main.config.js && webpack --color --config app/webpack.config.js && webpack --color --config terminus-core/webpack.config.js && webpack --color --config terminus-settings/webpack.config.js && webpack --color --config terminus-terminal/webpack.config.js && webpack --color --config terminus-settings/webpack.config.js && webpack --color --config terminus-plugin-manager/webpack.config.js && webpack --color --config terminus-community-color-schemes/webpack.config.js && webpack --color --config terminus-ssh/webpack.config.js",
|
"build": "webpack --color --config app/webpack.main.config.js && webpack --color --config app/webpack.config.js && webpack --color --config terminus-core/webpack.config.js && webpack --color --config terminus-settings/webpack.config.js && webpack --color --config terminus-terminal/webpack.config.js && webpack --color --config terminus-settings/webpack.config.js && webpack --color --config terminus-plugin-manager/webpack.config.js && webpack --color --config terminus-community-color-schemes/webpack.config.js && webpack --color --config terminus-ssh/webpack.config.js",
|
||||||
"watch": "cross-env DEV=1 webpack --progress --color --watch",
|
"watch": "cross-env TERMINUS_DEV=1 webpack --progress --color --watch",
|
||||||
"start": "cross-env DEV=1 electron app --debug",
|
"start": "cross-env TERMINUS_DEV=1 electron app --debug",
|
||||||
"prod": "cross-env DEV=1 electron app",
|
"prod": "cross-env TERMINUS_DEV=1 electron app",
|
||||||
"lint": "tslint -c tslint.json -t stylish terminus-*/src/**/*.ts terminus-*/src/*.ts app/src/*.ts",
|
"lint": "tslint -c tslint.json -t stylish terminus-*/src/**/*.ts terminus-*/src/*.ts app/src/*.ts",
|
||||||
"postinstall": "node ./scripts/install-deps.js"
|
"postinstall": "node ./scripts/install-deps.js"
|
||||||
},
|
},
|
||||||
|
@ -13,7 +13,7 @@ module.exports = {
|
|||||||
libraryTarget: 'umd',
|
libraryTarget: 'umd',
|
||||||
devtoolModuleFilenameTemplate: 'webpack-terminus-community-color-schemes:///[resource-path]',
|
devtoolModuleFilenameTemplate: 'webpack-terminus-community-color-schemes:///[resource-path]',
|
||||||
},
|
},
|
||||||
mode: process.env.DEV ? 'development' : 'production',
|
mode: process.env.TERMINUS_DEV ? 'development' : 'production',
|
||||||
optimization:{
|
optimization:{
|
||||||
minimize: false,
|
minimize: false,
|
||||||
},
|
},
|
||||||
|
@ -14,7 +14,7 @@ module.exports = {
|
|||||||
libraryTarget: 'umd',
|
libraryTarget: 'umd',
|
||||||
devtoolModuleFilenameTemplate: 'webpack-terminus-core:///[resource-path]',
|
devtoolModuleFilenameTemplate: 'webpack-terminus-core:///[resource-path]',
|
||||||
},
|
},
|
||||||
mode: process.env.DEV ? 'development' : 'production',
|
mode: process.env.TERMINUS_DEV ? 'development' : 'production',
|
||||||
optimization:{
|
optimization:{
|
||||||
minimize: false,
|
minimize: false,
|
||||||
},
|
},
|
||||||
|
@ -13,7 +13,7 @@ module.exports = {
|
|||||||
libraryTarget: 'umd',
|
libraryTarget: 'umd',
|
||||||
devtoolModuleFilenameTemplate: 'webpack-terminus-plugin-manager:///[resource-path]',
|
devtoolModuleFilenameTemplate: 'webpack-terminus-plugin-manager:///[resource-path]',
|
||||||
},
|
},
|
||||||
mode: process.env.DEV ? 'development' : 'production',
|
mode: process.env.TERMINUS_DEV ? 'development' : 'production',
|
||||||
optimization:{
|
optimization:{
|
||||||
minimize: false,
|
minimize: false,
|
||||||
},
|
},
|
||||||
|
@ -14,7 +14,7 @@ module.exports = {
|
|||||||
libraryTarget: 'umd',
|
libraryTarget: 'umd',
|
||||||
devtoolModuleFilenameTemplate: 'webpack-terminus-settings:///[resource-path]',
|
devtoolModuleFilenameTemplate: 'webpack-terminus-settings:///[resource-path]',
|
||||||
},
|
},
|
||||||
mode: process.env.DEV ? 'development' : 'production',
|
mode: process.env.TERMINUS_DEV ? 'development' : 'production',
|
||||||
optimization:{
|
optimization:{
|
||||||
minimize: false,
|
minimize: false,
|
||||||
},
|
},
|
||||||
|
@ -12,7 +12,7 @@ module.exports = {
|
|||||||
libraryTarget: 'umd',
|
libraryTarget: 'umd',
|
||||||
devtoolModuleFilenameTemplate: 'webpack-terminus-ssh:///[resource-path]',
|
devtoolModuleFilenameTemplate: 'webpack-terminus-ssh:///[resource-path]',
|
||||||
},
|
},
|
||||||
mode: process.env.DEV ? 'development' : 'production',
|
mode: process.env.TERMINUS_DEV ? 'development' : 'production',
|
||||||
optimization:{
|
optimization:{
|
||||||
minimize: false,
|
minimize: false,
|
||||||
},
|
},
|
||||||
|
@ -15,7 +15,7 @@ export class ButtonProvider extends ToolbarButtonProvider {
|
|||||||
hotkeys: HotkeysService,
|
hotkeys: HotkeysService,
|
||||||
) {
|
) {
|
||||||
super()
|
super()
|
||||||
if (!electron.remote.process.env.DEV) {
|
if (!electron.remote.process.env.TERMINUS_DEV) {
|
||||||
setImmediate(async () => {
|
setImmediate(async () => {
|
||||||
let argv: string[] = electron.remote.process.argv
|
let argv: string[] = electron.remote.process.argv
|
||||||
for (let arg of argv.slice(1).concat([electron.remote.process.argv0])) {
|
for (let arg of argv.slice(1).concat([electron.remote.process.argv0])) {
|
||||||
|
@ -25,7 +25,7 @@ export class UACService {
|
|||||||
'UAC.exe',
|
'UAC.exe',
|
||||||
)
|
)
|
||||||
|
|
||||||
if (process.env.DEV) {
|
if (process.env.TERMINUS_DEV) {
|
||||||
helperPath = path.join(
|
helperPath = path.join(
|
||||||
path.dirname(this.electron.app.getPath('exe')),
|
path.dirname(this.electron.app.getPath('exe')),
|
||||||
'..', '..', '..',
|
'..', '..', '..',
|
||||||
|
@ -13,7 +13,7 @@ module.exports = {
|
|||||||
libraryTarget: 'umd',
|
libraryTarget: 'umd',
|
||||||
devtoolModuleFilenameTemplate: 'webpack-terminus-terminal:///[resource-path]',
|
devtoolModuleFilenameTemplate: 'webpack-terminus-terminal:///[resource-path]',
|
||||||
},
|
},
|
||||||
mode: process.env.DEV ? 'development' : 'production',
|
mode: process.env.TERMINUS_DEV ? 'development' : 'production',
|
||||||
optimization: {
|
optimization: {
|
||||||
minimize: false,
|
minimize: false,
|
||||||
},
|
},
|
||||||
|
Loading…
x
Reference in New Issue
Block a user