Browse Source

Bundle fontawesome (#208)

pull/211/head
Ben Letchford 5 years ago
committed by Cian Butler
parent
commit
342474e60e
  1. 4
      package.json
  2. 6
      src/client/index.ts
  3. 1
      src/server/socketServer/html.ts
  4. 19
      yarn.lock

4
package.json

@ -1,6 +1,6 @@
{ {
"name": "wetty", "name": "wetty",
"version": "1.2.0", "version": "1.2.1",
"description": "WeTTY = Web + TTY. Terminal access in browser over http/https", "description": "WeTTY = Web + TTY. Terminal access in browser over http/https",
"homepage": "https://github.com/butlerx/wetty", "homepage": "https://github.com/butlerx/wetty",
"repository": { "repository": {
@ -54,6 +54,8 @@
}, },
"preferGlobal": true, "preferGlobal": true,
"dependencies": { "dependencies": {
"@fortawesome/fontawesome-svg-core": "^1.2.25",
"@fortawesome/free-solid-svg-icons": "^5.11.2",
"compression": "^1.7.4", "compression": "^1.7.4",
"express": "^4.17.1", "express": "^4.17.1",
"file-type": "^12.3.0", "file-type": "^12.3.0",

6
src/client/index.ts

@ -1,6 +1,8 @@
import { Terminal } from 'xterm'; import { Terminal } from 'xterm';
import { isNull } from 'lodash'; import { isNull } from 'lodash';
import { library, dom } from "@fortawesome/fontawesome-svg-core";
import { faCogs } from "@fortawesome/free-solid-svg-icons/faCogs";
import { socket } from './socket'; import { socket } from './socket';
import { overlay, terminal } from './elements'; import { overlay, terminal } from './elements';
import { fileBuffer, onCompleteFile, FILE_BEGIN, FILE_END } from './download'; import { fileBuffer, onCompleteFile, FILE_BEGIN, FILE_END } from './download';
@ -13,6 +15,10 @@ import { copySelected, copyShortcut } from './copyToClipboard';
import './wetty.scss'; import './wetty.scss';
import './favicon.ico'; import './favicon.ico';
// Setup for fontawesome
library.add(faCogs);
dom.watch();
socket.on('connect', () => { socket.on('connect', () => {
const term = new Terminal(); const term = new Terminal();
if (isNull(terminal)) return; if (isNull(terminal)) return;

1
src/server/socketServer/html.ts

@ -13,7 +13,6 @@ export default (base: string, title: string) => (
<meta name="viewport" content="width=device-width, initial-scale=1.0, user-scalable=no"> <meta name="viewport" content="width=device-width, initial-scale=1.0, user-scalable=no">
<title>${title}</title> <title>${title}</title>
<link rel="stylesheet" href="${resourcePath}public/index.css" /> <link rel="stylesheet" href="${resourcePath}public/index.css" />
<link rel="stylesheet" href="https://use.fontawesome.com/releases/v5.8.1/css/all.css" integrity="sha384-50oBUHEmvpQ+1lW4y57PTFmhCaXp0ML5d60M1M7uH2+nqUivzIebhndOJK28anvf" crossorigin="anonymous">
</head> </head>
<body> <body>
<div id="overlay"> <div id="overlay">

19
yarn.lock

@ -704,6 +704,25 @@
lodash "^4.17.13" lodash "^4.17.13"
to-fast-properties "^2.0.0" to-fast-properties "^2.0.0"
"@fortawesome/fontawesome-common-types@^0.2.25":
version "0.2.25"
resolved "https://registry.yarnpkg.com/@fortawesome/fontawesome-common-types/-/fontawesome-common-types-0.2.25.tgz#6df015905081f2762e5cfddeb7a20d2e9b16c786"
integrity sha512-3RuZPDuuPELd7RXtUqTCfed14fcny9UiPOkdr2i+cYxBoTOfQgxcDoq77fHiiHcgWuo1LoBUpvGxFF1H/y7s3Q==
"@fortawesome/fontawesome-svg-core@^1.2.25":
version "1.2.25"
resolved "https://registry.yarnpkg.com/@fortawesome/fontawesome-svg-core/-/fontawesome-svg-core-1.2.25.tgz#24b03391d14f0c6171e8cad7057c687b74049790"
integrity sha512-MotKnn53JKqbkLQiwcZSBJVYtTgIKFbh7B8+kd05TSnfKYPFmjKKI59o2fpz5t0Hzl35vVGU6+N4twoOpZUrqA==
dependencies:
"@fortawesome/fontawesome-common-types" "^0.2.25"
"@fortawesome/free-solid-svg-icons@^5.11.2":
version "5.11.2"
resolved "https://registry.yarnpkg.com/@fortawesome/free-solid-svg-icons/-/free-solid-svg-icons-5.11.2.tgz#2f2f1459743a27902b76655a0d0bc5ec4d945631"
integrity sha512-zBue4i0PAZJUXOmLBBvM7L0O7wmsDC8dFv9IhpW5QL4kT9xhhVUsYg/LX1+5KaukWq4/cbDcKT+RT1aRe543sg==
dependencies:
"@fortawesome/fontawesome-common-types" "^0.2.25"
"@nodelib/fs.scandir@2.1.3": "@nodelib/fs.scandir@2.1.3":
version "2.1.3" version "2.1.3"
resolved "https://registry.yarnpkg.com/@nodelib/fs.scandir/-/fs.scandir-2.1.3.tgz#3a582bdb53804c6ba6d146579c46e52130cf4a3b" resolved "https://registry.yarnpkg.com/@nodelib/fs.scandir/-/fs.scandir-2.1.3.tgz#3a582bdb53804c6ba6d146579c46e52130cf4a3b"

Loading…
Cancel
Save