Skip to content

Commit

Permalink
[ci skip] fix browser
Browse files Browse the repository at this point in the history
  • Loading branch information
yuki tamazawa committed Dec 3, 2019
1 parent 80509c8 commit a09bf98
Show file tree
Hide file tree
Showing 5 changed files with 61 additions and 1 deletion.
1 change: 1 addition & 0 deletions Browser/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
"ws": "^7.2.0"
},
"devDependencies": {
"file-loader": "^5.0.2",
"jqtree": "^1.4.9",
"jquery": "^3.4.1",
"webpack": "^4.29.6",
Expand Down
2 changes: 2 additions & 0 deletions Browser/src/app.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
import 'jqtree'
import * as blobUtil from 'blob-util'

require('file-loader?name=[name].[ext]!./index.html');

const sock = new WebSocket("ws://0.0.0.0:8080");

sock.addEventListener("message", e => {
Expand Down
41 changes: 41 additions & 0 deletions Browser/src/index.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
<!DOCTYPE html>
<html lang="ja">

<head>
<link rel="stylesheet" href="https://mbraak.github.io/jqTree/jqtree.css">
<script src="./bundle.js"></script>
<meta charset="utf-8">
<title>RIB Tree Viewer</title>
</head>
<style>
* {
box-sizing: border-box;
}

/* Create two equal columns that floats next to each other */
.column {
float: left;
width: 50%;
padding: 10px;
height: 300px; /* Should be removed. Only for demonstration */
}

/* Clear floats after the columns */
.row:after {
content: "";
display: table;
clear: both;
}
</style>

<body>

<div class="row">
<div class="column" id="body"></div>
<div class="column">
<img id="capture" width="100%" />
</div>
</div>

</body>
</html>
2 changes: 1 addition & 1 deletion Browser/webpack.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ module.exports = {
entry: './src/app.js',
output: {
filename: 'bundle.js',
path: path.join(__dirname, 'public/js')
path: path.join(__dirname, 'public')
},
plugins: [
new webpack.ProvidePlugin({
Expand Down
16 changes: 16 additions & 0 deletions Browser/yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -980,6 +980,14 @@ figgy-pudding@^3.5.1:
resolved "https://registry.yarnpkg.com/figgy-pudding/-/figgy-pudding-3.5.1.tgz#862470112901c727a0e495a80744bd5baa1d6790"
integrity sha512-vNKxJHTEKNThjfrdJwHc7brvM6eVevuO5nTj6ez8ZQ1qbXTvGthucRF7S4vf2cr71QVnT70V34v0S1DyQsti0w==

file-loader@^5.0.2:
version "5.0.2"
resolved "https://registry.yarnpkg.com/file-loader/-/file-loader-5.0.2.tgz#7f3d8b4ac85a5e8df61338cfec95d7405f971caa"
integrity sha512-QMiQ+WBkGLejKe81HU8SZ9PovsU/5uaLo0JdTCEXOYv7i7jfAjHZi1tcwp9tSASJPOmmHZtbdCervFmXMH/Dcg==
dependencies:
loader-utils "^1.2.3"
schema-utils "^2.5.0"

fill-range@^4.0.0:
version "4.0.0"
resolved "https://registry.yarnpkg.com/fill-range/-/fill-range-4.0.0.tgz#d544811d428f98eb06a63dc402d2403c328c38f7"
Expand Down Expand Up @@ -2344,6 +2352,14 @@ schema-utils@^1.0.0:
ajv-errors "^1.0.0"
ajv-keywords "^3.1.0"

schema-utils@^2.5.0:
version "2.6.1"
resolved "https://registry.yarnpkg.com/schema-utils/-/schema-utils-2.6.1.tgz#eb78f0b945c7bcfa2082b3565e8db3548011dc4f"
integrity sha512-0WXHDs1VDJyo+Zqs9TKLKyD/h7yDpHUhEFsM2CzkICFdoX1av+GBq/J2xRTFfsQO5kBfhZzANf2VcIm84jqDbg==
dependencies:
ajv "^6.10.2"
ajv-keywords "^3.4.1"

semver@^5.3.0, semver@^5.5.0, semver@^5.6.0:
version "5.7.1"
resolved "https://registry.yarnpkg.com/semver/-/semver-5.7.1.tgz#a954f931aeba508d307bbf069eff0c01c96116f7"
Expand Down

0 comments on commit a09bf98

Please sign in to comment.