Skip to content

Commit

Permalink
Add xterm itegration
Browse files Browse the repository at this point in the history
* Move to TypeScript from legacy JavaScript
* Add support of xterm.js
* Hterm is still available for backward compatibility
  • Loading branch information
yudai committed Aug 21, 2017
1 parent d6c9886 commit 8803721
Show file tree
Hide file tree
Showing 40 changed files with 9,051 additions and 124 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
gotty
bindata
builds
js/node_modules/*
2 changes: 1 addition & 1 deletion .gitmodules
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
[submodule "libapps"]
path = libapps
path = js/libapps
url = https://chromium.googlesource.com/apps/libapps
30 changes: 24 additions & 6 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ gotty: server/asset.go main.go server/*.go webtty/*.go backend/*.go Makefile

asset: server/asset.go

server/asset.go: bindata/static/js/hterm.js bindata/static/js/gotty.js bindata/static/index.html bindata/static/favicon.png
server/asset.go: bindata/static/js/hterm.js bindata/static/js/bundle.js bindata/static/index.html bindata/static/favicon.png bindata/static/css/index.css bindata/static/css/xterm.css bindata/static/css/xterm_customize.css
go-bindata -prefix bindata -pkg server -ignore=\\.gitkeep -o server/asset.go bindata/...
gofmt -w server/asset.go

Expand All @@ -26,12 +26,30 @@ bindata/static/favicon.png: bindata/static resources/favicon.png
bindata/static/js: bindata/static
mkdir -p bindata/static/js

bindata/static/js/hterm.js: bindata/static/js libapps/hterm/js/*.js
cd libapps && \
LIBDOT_SEARCH_PATH=`pwd` ./libdot/bin/concat.sh -i ./hterm/concat/hterm_all.concat -o ../bindata/static/js/hterm.js
bindata/static/js/hterm.js: bindata/static/js js/libapps/hterm/js/*.js
cd js/libapps && \
LIBDOT_SEARCH_PATH=`pwd` ./libdot/bin/concat.sh -i ./hterm/concat/hterm_all.concat -o ../../bindata/static/js/hterm.js

bindata/static/js/bundle.js: bindata/static/js js/dist/bundle.js
cp js/dist/bundle.js bindata/static/js/bundle.js

bindata/static/css: bindata/static
mkdir -p bindata/static/css

bindata/static/css/index.css: bindata/static/css resources/index.css
cp resources/index.css bindata/static/css/index.css

bindata/static/css/xterm_customize.css: bindata/static/css resources/xterm_customize.css
cp resources/xterm_customize.css bindata/static/css/xterm_customize.css

bindata/static/css/xterm.css: bindata/static/css js/node_modules/xterm/dist/xterm.css
cp js/node_modules/xterm/dist/xterm.css bindata/static/css/xterm.css

js/dist/bundle.js:
cd js && \
webpack


bindata/static/js/gotty.js: bindata/static/js resources/gotty.js
cp resources/gotty.js bindata/static/js/gotty.js

tools:
go get github.com/tools/godep
Expand Down
Loading

0 comments on commit 8803721

Please sign in to comment.