1
1
mirror of https://github.com/Eugeny/tabby.git synced 2024-12-22 18:11:43 +03:00
This commit is contained in:
Eugene Pankov 2017-04-30 00:25:01 +02:00
parent 8be70110fe
commit 46b0b0e172
13 changed files with 41 additions and 38 deletions

11
.gitignore vendored
View File

@ -1,19 +1,10 @@
app/node_modules
app/src/daemonInstaller.generated.js
app/assets/webpack
app/elements-native.node
node_modules
typings
build/files.wxs
native/windows/build
native/mac/build
native/linux/build
native/build
dist
driver/build
driver/obj
*.xcworkspacedata
*.xcuserstate
@ -22,3 +13,5 @@ driver/obj
coverage
.nyc_output
npm-debug.log
builtin-plugins

View File

@ -3,6 +3,8 @@ MAC_OUTPUT="./dist/Elements-Electron.pkg"
FULL_VERSION=$(shell python -c 'import subprocess; v = subprocess.check_output("git describe --tags --long", shell=True).strip()[1:]; print(v.split("-0-g")[0])')
SHORT_VERSION=$(shell python -c 'import subprocess; v = subprocess.check_output("git describe --tags --long", shell=True).strip()[1:].split("-")[0]; print(v)')
builtin_plugins = terminus-core terminus-settings terminus-terminal
all: run
run:
@ -20,7 +22,7 @@ watch:
install-deps:
npm install
npm prune
for dir in app terminus-* ; do \
for dir in app $(builtin_plugins) ; do \
cd $$dir; \
npm install; \
npm prune; \
@ -32,39 +34,29 @@ build-native:
./node_modules/.bin/electron-rebuild -f -w terminus-terminal/node_modules/node-pty -m terminus-terminal
./node_modules/.bin/electron-rebuild -f -w terminus-terminal/node_modules/font-manager -m terminus-terminal
build-native-windows:
echo :: Building native extensions
rm -r ./native/windows/build || true
cd native/windows && node-gyp rebuild --target=1.4.12 --arch=x64 --dist-url=https://atom.io/download/atom-shell
mkdir native/build || true
cp ./native/windows/build/Release/elements-native.node ./app/
build-native-mac:
echo :: Building native extensions
rm -r ./native/mac/build || true
cd native/mac && node-gyp rebuild --target=1.4.12 --arch=x64 --dist-url=https://atom.io/download/atom-shell
mkdir native/build || true
cp ./native/mac/build/Release/elements-native.node ./app/
build-native-linux:
echo :: Building native extensions
rm -r ./native/linux/build || true
cd native/linux && node-gyp rebuild --target=1.4.12 --arch=x64 --dist-url=https://atom.io/download/atom-shell
mkdir native/build || true
cp ./native/linux/build/Release/elements-native.node ./app/
build-windows: build-native-windows
build-windows:
echo :: Building application
./node_modules/.bin/build --dir --win --em.version=$(FULL_VERSION)
cp ./app/assets/img/disk.ico dist/win-unpacked/
build-mac: build-native-mac
build-mac:
echo :: Building application
./node_modules/.bin/build --dir --mac --em.version=$(FULL_VERSION)
build-linux: build-native-linux
build-linux:
echo :: Building application
mkdir builtin-plugins || true
echo '{}' > builtin-plugins/package.json
cd builtin-plugins && for dir in $(builtin_plugins) ; do \
npm install ../$$dir; \
done
cd builtin-plugins && npm dedupe
./node_modules/.bin/electron-rebuild -f -m builtin-plugins -w node-pty,font-manager
./node_modules/.bin/build --linux --em.version=$(FULL_VERSION)
rm -r builtin-plugins || true
package-windows-app:
echo :: Building app MSI $(SHORT_VERSION)

View File

@ -1,6 +1,7 @@
{
"name": "terminus",
"version": "0.0.1",
"description": "A terminal for a modern age",
"author": "Eugene Pankov",
"main": "main.js",
"scripts": {
"build": "../node_modules/.bin/webpack --progress --color --display-modules",

View File

@ -12,6 +12,12 @@ function normalizePath (path: string): string {
};
(<any>global).require.main.paths.map(x => nodeModule.globalPaths.push(normalizePath(x)))
nodeModule.globalPaths.unshift(
path.join(
path.dirname(require('electron').remote.app.getPath('exe')),
'resources/builtin-plugins/node_modules',
)
)
if (process.env.TERMINUS_PLUGINS) {
process.env.TERMINUS_PLUGINS.split(':').map(x => nodeModule.globalPaths.unshift(normalizePath(x)))

View File

@ -56,6 +56,7 @@ module.exports = {
'@angular/common': 'commonjs @angular/common',
'@ng-bootstrap/ng-bootstrap': 'commonjs @ng-bootstrap/ng-bootstrap',
'fs-promise': 'commonjs fs-promise',
'electron': 'commonjs electron',
'module': 'commonjs module',
'path': 'commonjs path',
'rxjs': 'commonjs rxjs',

View File

@ -11,7 +11,7 @@
"cross-env": "^4.0.0",
"css-loader": "0.26.1",
"electron": "1.6.2",
"electron-builder": "10.6.1",
"electron-builder": "^17.1.1",
"electron-osx-sign": "electron-userland/electron-osx-sign#f092181a1bffa2b3248a23ee28447a47e14a8f04",
"electron-rebuild": "1.5.7",
"file-loader": "^0.9.0",
@ -41,6 +41,9 @@
"appId": "com.elements.benchmark",
"productName": "ELEMENTS Benchmark",
"compression": "normal",
"extraResources": [
"builtin-plugins"
],
"win": {
"target": "zip",
"icon": "./app/assets/img/shortcut.ico"

View File

@ -8,6 +8,7 @@
"build": "webpack --progress --color",
"watch": "webpack --progress --color --watch"
},
"files": ["dist"],
"author": "Eugene Pankov",
"license": "MIT",
"devDependencies": {

View File

@ -8,6 +8,7 @@
"build": "webpack --progress --color",
"watch": "webpack --progress --color --watch"
},
"files": ["dist"],
"author": "Eugene Pankov",
"license": "MIT",
"peerDependencies": {

View File

@ -8,6 +8,7 @@
"build": "rm -rf dist && webpack --progress --color --display-modules",
"watch": "rm -rf dist && webpack --progress --color --watch"
},
"files": ["dist"],
"author": "Eugene Pankov",
"license": "MIT",
"devDependencies": {

View File

@ -8,6 +8,7 @@
"build": "webpack --progress --color --display-modules",
"watch": "webpack --progress --color --watch"
},
"files": ["dist"],
"author": "Eugene Pankov",
"license": "MIT",
"devDependencies": {

View File

@ -8,6 +8,7 @@
"build": "webpack --progress --color --display-modules",
"watch": "webpack --progress --color --watch"
},
"files": ["dist"],
"author": "Eugene Pankov",
"license": "MIT",
"devDependencies": {

View File

@ -1,5 +1,5 @@
import { BehaviorSubject, ReplaySubject, Subject, Subscription } from 'rxjs'
import { Component, NgZone, Inject, ViewChild, HostBinding, Input } from '@angular/core'
import { Component, NgZone, Inject, Optional, ViewChild, HostBinding, Input } from '@angular/core'
import { AppService, ConfigService, BaseTabComponent, ThemesService, HostAppService, Platform } from 'terminus-core'
import { Session } from '../services/sessions.service'
@ -36,9 +36,10 @@ export class TerminalTabComponent extends BaseTabComponent {
private themes: ThemesService,
private hostApp: HostAppService,
public config: ConfigService,
@Inject(TerminalDecorator) private decorators: TerminalDecorator[],
@Optional() @Inject(TerminalDecorator) private decorators: TerminalDecorator[],
) {
super()
this.decorators = this.decorators || []
this.configSubscription = config.change.subscribe(() => {
this.configure()
})

View File

@ -7,6 +7,7 @@
"build": "webpack --progress --color",
"watch": "webpack --progress --color --watch"
},
"files": ["dist"],
"author": "Eugene Pankov",
"license": "MIT",
"peerDependencies": {